home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-19 | 13.3 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Apr 19 16:22:16 1995, modified Wed Apr 19 16:22:16 1995, creator 'MMCC', type ASCII, 12839 bytes "PaperJuggling.h" , at 0x32a7 410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 50 61 70 65 72 4a | 75 67 67 6c 69 6e 67 2e |..PaperJ|uggling.|
|00000010| 68 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |h.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 32 27 00 | 00 01 9a ab bb 21 78 ab |.....2'.|.....!x.|
|00000060| bb 21 78 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.!x.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 66 b8 00 00 |........|....f...|
|00000080| 2f 2a 0d 09 50 61 70 65 | 72 20 4a 75 67 67 6c 69 |/*..Pape|r Juggli|
|00000090| 6e 67 2c 20 77 72 69 74 | 74 65 6e 20 62 79 20 44 |ng, writ|ten by D|
|000000a0| 61 76 65 20 4a 6f 68 6e | 73 6f 6e 0d 09 0d 09 0d |ave John|son.....|
|000000b0| 09 54 68 69 73 20 70 72 | 6f 67 72 61 6d 20 69 6d |.This pr|ogram im|
|000000c0| 70 6c 65 6d 65 6e 74 73 | 20 61 20 73 6f 72 74 20 |plements| a sort |
|000000d0| 6f 66 20 22 61 63 74 69 | 76 65 20 67 72 61 70 68 |of "acti|ve graph|
|000000e0| 20 70 61 70 65 72 22 20 | 66 6f 72 20 6d 65 73 73 | paper" |for mess|
|000000f0| 69 6e 67 20 77 69 74 68 | 0d 09 6d 75 6c 74 69 2d |ing with|..multi-|
|00000100| 70 65 72 73 6f 6e 20 6a | 75 67 67 6c 69 6e 67 20 |person j|uggling |
|00000110| 70 61 74 74 65 72 6e 73 | 2e 20 53 65 65 20 54 68 |patterns|. See Th|
|00000120| 65 20 56 65 74 65 72 61 | 6e 20 4e 65 6f 70 68 79 |e Vetera|n Neophy|
|00000130| 74 65 20 69 6e 20 64 65 | 76 65 6c 6f 70 0d 09 6d |te in de|velop..m|
|00000140| 61 67 61 7a 69 6e 65 20 | 69 73 73 75 65 20 32 32 |agazine |issue 22|
|00000150| 20 66 6f 72 20 61 6e 20 | 65 78 70 6c 61 6e 61 74 | for an |explanat|
|00000160| 69 6f 6e 20 6f 66 20 6a | 75 67 67 6c 69 6e 67 20 |ion of j|uggling |
|00000170| 70 61 74 74 65 72 6e 73 | 20 69 6e 20 67 65 6e 65 |patterns| in gene|
|00000180| 72 61 6c 20 61 6e 64 0d | 09 74 68 69 73 20 6e 6f |ral and.|.this no|
|00000190| 74 61 74 69 6f 6e 20 69 | 6e 20 70 61 72 74 69 63 |tation i|n partic|
|000001a0| 75 6c 61 72 2e 20 4b 65 | 65 70 20 72 65 61 64 69 |ular. Ke|ep readi|
|000001b0| 6e 67 20 66 6f 72 20 69 | 6d 70 6c 65 6d 65 6e 74 |ng for i|mplement|
|000001c0| 61 74 69 6f 6e 20 64 65 | 74 61 69 6c 73 2e 0d 09 |ation de|tails...|
|000001d0| 0d 09 54 68 69 73 20 70 | 72 6f 67 72 61 6d 20 69 |..This p|rogram i|
|000001e0| 73 20 68 61 63 6b 65 64 | 20 74 6f 67 65 74 68 65 |s hacked| togethe|
|000001f0| 72 20 66 6f 72 20 66 75 | 6e 2c 20 61 6e 64 20 73 |r for fu|n, and s|
|00000200| 68 6f 75 6c 64 20 6e 6f | 74 20 62 65 20 63 6f 6e |hould no|t be con|
|00000210| 73 69 64 65 72 65 64 20 | 61 20 67 6f 6f 64 0d 09 |sidered |a good..|
|00000220| 65 78 61 6d 70 6c 65 20 | 6f 66 20 61 6e 79 74 68 |example |of anyth|
|00000230| 69 6e 67 2e 0d 09 0d 09 | 2d 2d 2d 2d 2d 2d 2d 2d |ing.....|--------|
|00000240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000250| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000260| 2d 0d 09 21 21 20 55 73 | 65 20 61 74 20 79 6f 75 |-..!! Us|e at you|
|00000270| 72 20 6f 77 6e 20 28 63 | 6f 6e 73 69 64 65 72 61 |r own (c|onsidera|
|00000280| 62 6c 65 29 20 72 69 73 | 6b 20 21 21 0d 09 2d 2d |ble) ris|k !!..--|
|00000290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002b0| 2d 2d 2d 2d 2d 2d 2d 0d | 09 0d 09 a5 47 58 20 53 |-------.|....GX S|
|000002c0| 74 72 61 74 65 67 79 3a | 0d 09 0d 09 41 20 6c 6f |trategy:|....A lo|
|000002d0| 74 20 6f 66 20 74 68 65 | 20 67 65 6e 65 72 61 6c |t of the| general|
|000002e0| 2d 70 75 72 70 6f 73 65 | 20 47 58 2d 73 70 65 63 |-purpose| GX-spec|
|000002f0| 69 66 69 63 20 63 6f 64 | 65 20 28 70 72 69 6e 74 |ific cod|e (print|
|00000300| 69 6e 67 2c 20 65 74 63 | 2e 29 20 69 73 20 73 74 |ing, etc|.) is st|
|00000310| 6f 6c 65 6e 20 64 69 72 | 65 63 74 6c 79 0d 09 66 |olen dir|ectly..f|
|00000320| 72 6f 6d 20 74 68 65 20 | 47 58 53 68 65 6c 6c 20 |rom the |GXShell |
|00000330| 73 61 6d 70 6c 65 20 62 | 79 20 44 61 76 65 20 48 |sample b|y Dave H|
|00000340| 65 72 73 65 79 20 61 6e | 64 20 50 65 74 65 20 22 |ersey an|d Pete "|
|00000350| 4c 75 6b 65 22 20 41 6c | 65 78 61 6e 64 65 72 2e |Luke" Al|exander.|
|00000360| 0d 09 0d 09 54 68 65 72 | 65 20 61 72 65 20 66 6f |....Ther|e are fo|
|00000370| 75 72 20 70 69 63 74 75 | 72 65 20 6f 62 6a 65 63 |ur pictu|re objec|
|00000380| 74 73 20 74 68 61 74 20 | 63 6f 6e 74 61 69 6e 20 |ts that |contain |
|00000390| 61 6c 6c 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 |all the |applicat|
|000003a0| 69 6f 6e 2d 73 70 65 63 | 69 66 69 63 20 0d 09 67 |ion-spec|ific ..g|
|000003b0| 72 61 70 68 69 63 61 6c | 20 6f 62 6a 65 63 74 73 |raphical| objects|
|000003c0| 3a 0d 09 2d 4f 6e 65 20 | 63 6f 6e 74 61 69 6e 73 |:..-One |contains|
|000003d0| 20 74 68 65 20 64 61 73 | 68 65 64 20 73 65 70 61 | the das|hed sepa|
|000003e0| 72 61 74 6f 72 20 6c 69 | 6e 65 73 2e 0d 09 2d 41 |rator li|nes...-A|
|000003f0| 6e 6f 74 68 65 72 20 63 | 6f 6e 74 61 69 6e 73 20 |nother c|ontains |
|00000400| 65 61 63 68 20 6f 66 20 | 74 68 65 20 6a 75 67 67 |each of |the jugg|
|00000410| 6c 65 72 73 20 69 6e 20 | 74 68 65 20 70 61 74 74 |lers in |the patt|
|00000420| 65 72 6e 20 28 65 61 63 | 68 20 6a 75 67 67 6c 65 |ern (eac|h juggle|
|00000430| 72 20 69 73 20 69 6e 20 | 74 75 72 6e 0d 09 61 20 |r is in |turn..a |
|00000440| 70 69 63 74 75 72 65 20 | 63 6f 6e 74 61 69 6e 69 |picture |containi|
|00000450| 6e 67 20 73 65 76 65 72 | 61 6c 20 22 68 61 6e 64 |ng sever|al "hand|
|00000460| 73 2c 22 20 77 68 69 63 | 68 20 61 72 65 20 6a 75 |s," whic|h are ju|
|00000470| 73 74 20 22 4c 22 20 6f | 72 20 22 52 22 20 74 65 |st "L" o|r "R" te|
|00000480| 78 74 20 73 68 61 70 65 | 73 29 2e 0d 09 2d 41 6e |xt shape|s)...-An|
|00000490| 6f 74 68 65 72 20 63 6f | 6e 74 61 69 6e 73 20 61 |other co|ntains a|
|000004a0| 6c 6c 20 74 68 65 20 70 | 72 69 6d 61 72 79 20 74 |ll the p|rimary t|
|000004b0| 68 72 6f 77 73 20 28 61 | 72 72 6f 77 73 29 2e 0d |hrows (a|rrows)..|
|000004c0| 09 2d 54 68 65 20 6c 61 | 73 74 20 6f 6e 65 20 63 |.-The la|st one c|
|000004d0| 6f 6e 74 61 69 6e 73 20 | 61 6c 6c 20 74 68 65 20 |ontains |all the |
|000004e0| 22 66 61 64 65 64 22 20 | 74 68 72 6f 77 73 2e 0d |"faded" |throws..|
|000004f0| 09 0d 09 54 68 65 72 65 | 20 69 73 20 6f 6e 65 20 |...There| is one |
|00000500| 6d 6f 72 65 20 70 69 63 | 74 75 72 65 20 6f 62 6a |more pic|ture obj|
|00000510| 65 63 74 20 74 68 61 74 | 20 63 6f 6e 74 61 69 6e |ect that| contain|
|00000520| 73 20 74 68 65 20 73 65 | 70 61 72 61 74 6f 72 73 |s the se|parators|
|00000530| 6d 20 6a 75 67 67 6c 65 | 72 73 2c 20 61 6e 64 20 |m juggle|rs, and |
|00000540| 0d 09 70 72 69 6d 61 72 | 79 20 74 68 72 6f 77 73 |..primar|y throws|
|00000550| 2c 20 75 73 65 64 20 6d | 6f 73 74 6c 79 20 66 6f |, used m|ostly fo|
|00000560| 72 20 70 72 69 6e 74 69 | 6e 67 20 61 6e 64 20 66 |r printi|ng and f|
|00000570| 6f 72 20 6f 6e 65 2d 73 | 74 65 70 20 64 72 61 77 |or one-s|tep draw|
|00000580| 69 6e 67 20 64 75 72 69 | 6e 67 20 75 70 64 61 74 |ing duri|ng updat|
|00000590| 65 73 2e 0d 09 0d 09 54 | 68 65 20 74 68 72 6f 77 |es.....T|he throw|
|000005a0| 20 73 68 61 70 65 73 20 | 75 73 65 20 61 6e 20 69 | shapes |use an i|
|000005b0| 6e 6b 20 74 68 61 74 20 | 64 72 61 77 73 20 69 6e |nk that |draws in|
|000005c0| 20 78 6f 72 20 6d 6f 64 | 65 2c 20 74 68 69 73 20 | xor mod|e, this |
|000005d0| 69 73 20 68 61 6e 64 79 | 20 66 6f 72 20 66 61 73 |is handy| for fas|
|000005e0| 74 20 65 72 61 73 69 6e | 67 0d 09 61 6e 64 20 72 |t erasin|g..and r|
|000005f0| 65 64 72 61 77 69 6e 67 | 20 77 69 74 68 6f 75 74 |edrawing| without|
|00000600| 20 64 69 73 74 75 72 62 | 69 6e 67 20 75 6e 64 65 | disturb|ing unde|
|00000610| 72 6c 79 69 6e 67 20 62 | 69 74 73 2e 20 28 54 68 |rlying b|its. (Th|
|00000620| 61 6e 6b 20 67 6f 6f 64 | 6e 65 73 73 20 66 6f 72 |ank good|ness for|
|00000630| 20 74 68 65 20 74 72 61 | 6e 73 66 65 72 0d 09 6d | the tra|nsfer..m|
|00000640| 6f 64 65 20 6c 69 62 72 | 61 72 79 20 61 6e 64 20 |ode libr|ary and |
|00000650| 74 68 65 20 53 65 74 49 | 6e 6b 46 61 73 74 58 6f |the SetI|nkFastXo|
|00000660| 72 54 72 61 6e 73 66 65 | 72 20 72 6f 75 74 69 6e |rTransfe|r routin|
|00000670| 65 2e 29 20 55 6e 66 6f | 72 74 75 6e 61 74 65 6c |e.) Unfo|rtunatel|
|00000680| 79 20 74 68 61 74 20 72 | 6f 75 74 69 6e 65 0d 09 |y that r|outine..|
|00000690| 77 6f 72 6b 73 20 6f 6e | 20 6f 6e 6c 79 20 6f 6e |works on| only on|
|000006a0| 65 20 64 65 76 69 63 65 | 20 61 74 20 61 20 74 69 |e device| at a ti|
|000006b0| 6d 65 20 28 73 65 65 20 | 4b 6e 6f 77 6e 20 44 65 |me (see |Known De|
|000006c0| 66 69 63 69 65 6e 63 69 | 65 73 20 62 65 6c 6f 77 |ficienci|es below|
|000006d0| 29 2e 0d 09 0d 09 54 68 | 65 20 66 61 64 65 64 20 |).....Th|e faded |
|000006e0| 74 68 72 6f 77 20 73 68 | 61 70 65 73 20 61 72 65 |throw sh|apes are|
|000006f0| 20 64 72 61 77 6e 20 73 | 69 6d 75 6c 74 61 6e 65 | drawn s|imultane|
|00000700| 6f 75 73 6c 79 20 69 6e | 74 6f 20 74 77 6f 20 73 |ously in|to two s|
|00000710| 65 70 61 72 61 74 65 20 | 76 69 65 77 70 6f 72 74 |eparate |viewport|
|00000720| 73 2c 20 77 68 69 63 68 | 0d 09 69 73 20 68 6f 77 |s, which|..is how|
|00000730| 20 74 68 65 20 6f 6e 65 | 73 20 74 68 61 74 20 22 | the one|s that "|
|00000740| 77 72 61 70 22 20 61 72 | 65 20 64 72 61 77 6e 20 |wrap" ar|e drawn |
|00000750| 69 6e 20 74 77 6f 20 70 | 6c 61 63 65 73 20 61 74 |in two p|laces at|
|00000760| 20 6f 6e 63 65 20 77 68 | 69 6c 65 20 64 72 61 67 | once wh|ile drag|
|00000770| 67 69 6e 67 2e 20 53 70 | 69 66 66 79 2e 0d 09 0d |ging. Sp|iffy....|
|00000780| 09 4d 61 6e 79 20 6d 6f | 72 65 20 70 69 64 64 6c |.Many mo|re piddl|
|00000790| 69 6e 67 20 64 65 74 61 | 69 6c 73 20 61 72 65 20 |ing deta|ils are |
|000007a0| 64 69 73 63 75 73 73 65 | 64 20 69 6e 20 74 68 65 |discusse|d in the|
|000007b0| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 62 65 | declara|tions be|
|000007c0| 6c 6f 77 20 61 6e 64 20 | 69 6e 20 74 68 65 20 63 |low and |in the c|
|000007d0| 6f 64 65 0d 09 69 74 73 | 65 6c 66 2e 0d 09 0d 09 |ode..its|elf.....|
|000007e0| a5 4b 6e 6f 77 6e 20 44 | 65 66 69 63 69 65 6e 63 |.Known D|eficienc|
|000007f0| 69 65 73 3a 0d 09 0d 09 | 50 72 69 6e 74 69 6e 67 |ies:....|Printing|
|00000800| 20 69 73 6e 27 74 20 67 | 72 65 61 74 2c 20 74 68 | isn't g|reat, th|
|00000810| 6f 75 67 68 20 69 74 27 | 73 20 74 68 65 72 65 2e |ough it'|s there.|
|00000820| 20 54 68 65 20 70 72 6f | 62 6c 65 6d 20 69 73 20 | The pro|blem is |
|00000830| 74 68 61 74 20 74 68 65 | 20 66 61 64 65 64 20 74 |that the| faded t|
|00000840| 68 72 6f 77 73 20 64 6f | 6e 27 74 0d 09 70 72 69 |hrows do|n't..pri|
|00000850| 6e 74 2c 20 73 69 6e 63 | 65 20 74 68 65 79 27 72 |nt, sinc|e they'r|
|00000860| 65 20 64 72 61 77 6e 20 | 69 6e 74 6f 20 64 69 66 |e drawn |into dif|
|00000870| 66 65 72 65 6e 74 20 76 | 69 65 77 70 6f 72 74 73 |ferent v|iewports|
|00000880| 2e 0d 09 0d 09 4d 75 6c | 74 69 70 6c 65 20 4d 6f |.....Mul|tiple Mo|
|00000890| 6e 69 74 6f 72 20 73 75 | 70 70 6f 72 74 20 69 73 |nitor su|pport is|
|000008a0| 20 6e 6f 6e 2d 65 78 69 | 73 74 65 6e 74 2e 20 54 | non-exi|stent. T|
|000008b0| 68 69 73 20 77 6f 75 6c | 64 6e 27 74 20 62 65 20 |his woul|dn't be |
|000008c0| 74 6f 6f 20 68 61 72 64 | 20 74 6f 20 66 69 78 3a |too hard| to fix:|
|000008d0| 20 6d 61 6b 65 20 61 20 | 0d 09 73 65 70 61 72 61 | make a |..separa|
|000008e0| 74 65 20 69 6e 6b 20 66 | 6f 72 20 65 61 63 68 20 |te ink f|or each |
|000008f0| 6d 6f 6e 69 74 6f 72 2c | 20 61 6e 64 20 75 73 65 |monitor,| and use|
|00000900| 20 44 65 76 69 63 65 4c | 6f 6f 70 20 74 6f 20 66 | DeviceL|oop to f|
|00000910| 69 67 75 72 65 20 6f 75 | 74 20 77 68 69 63 68 20 |igure ou|t which |
|00000920| 6f 6e 65 20 74 6f 20 75 | 73 65 20 6f 6e 0d 09 74 |one to u|se on..t|
|00000930| 68 65 20 66 6c 79 2e 0d | 0d 09 a5 4b 6e 6f 77 6e |he fly..|...Known|
|00000940| 20 42 75 67 73 3a 0d 09 | 0d 09 54 6f 6f 20 6d 61 | Bugs:..|..Too ma|
|00000950| 6e 79 20 74 6f 20 74 65 | 6c 6c 20 79 6f 75 20 61 |ny to te|ll you a|
|00000960| 62 6f 75 74 20 74 68 65 | 6d 20 61 6c 6c 2e 2e 2e |bout the|m all...|
|00000970| 20 3a 2d 29 0d 0d 2a 2f | 0d 0d 23 69 6e 63 6c 75 | :-)..*/|..#inclu|
|00000980| 64 65 20 22 53 68 65 6c | 6c 2e 68 22 0d 2f 2f 20 |de "Shel|l.h".// |
|00000990| 20 23 69 6e 63 6c 75 64 | 65 20 22 41 70 70 49 6e | #includ|e "AppIn|
|000009a0| 74 65 72 66 61 63 65 2e | 68 22 0d 0d 0d 0d 2f 2f |terface.|h"....//|
|000009b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000009c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 2f |--------|------./|
|000009d0| 2f 20 43 6f 6e 73 74 61 | 6e 74 73 0d 0d 2f 2f 20 |/ Consta|nts..// |
|000009e0| 43 6f 6c 6f 72 73 0d 23 | 64 65 66 69 6e 65 09 6b |Colors.#|define.k|
|000009f0| 42 47 43 6f 6c 6f 72 09 | 09 09 77 68 69 74 65 0d |BGColor.|..white.|
|00000a00| 23 64 65 66 69 6e 65 20 | 6b 53 65 70 61 72 61 74 |#define |kSeparat|
|00000a10| 6f 72 43 6f 6c 6f 72 09 | 09 62 6c 61 63 6b 0d 23 |orColor.|.black.#|
|00000a20| 64 65 66 69 6e 65 20 6b | 41 72 72 6f 77 43 6f 6c |define k|ArrowCol|
|00000a30| 6f 72 09 09 09 72 65 64 | 0d 23 64 65 66 69 6e 65 |or...red|.#define|
|00000a40| 20 6b 48 61 6e 64 43 6f | 6c 6f 72 09 09 09 62 6c | kHandCo|lor...bl|
|00000a50| 75 65 0d 23 64 65 66 69 | 6e 65 20 6b 4c 61 62 65 |ue.#defi|ne kLabe|
|00000a60| 6c 43 6f 6c 6f 72 09 09 | 09 62 6c 61 63 6b 0d 0d |lColor..|.black..|
|00000a70| 2f 2f 20 44 69 73 74 61 | 6e 63 65 73 20 61 6e 64 |// Dista|nces and|
|00000a80| 20 6f 74 68 65 72 20 63 | 6f 6e 73 74 61 6e 74 20 | other c|onstant |
|00000a90| 6e 75 6d 62 65 72 73 0d | 23 64 65 66 69 6e 65 20 |numbers.|#define |
|00000aa0| 6b 41 72 72 6f 77 48 65 | 61 64 4c 65 6e 67 74 68 |kArrowHe|adLength|
|00000ab0| 09 66 66 28 34 29 0d 23 | 64 65 66 69 6e 65 20 6b |.ff(4).#|define k|
|00000ac0| 41 72 72 6f 77 48 65 61 | 64 48 65 69 67 68 74 09 |ArrowHea|dHeight.|
|00000ad0| 66 66 28 34 29 0d 23 64 | 65 66 69 6e 65 20 6b 41 |ff(4).#d|efine kA|
|00000ae0| 72 72 6f 77 50 65 6e 53 | 69 7a 65 09 09 66 66 28 |rrowPenS|ize..ff(|
|00000af0| 33 29 0d 0d 23 64 65 66 | 69 6e 65 20 6b 44 65 66 |3)..#def|ine kDef|
|00000b00| 61 75 6c 74 47 72 69 64 | 53 70 61 63 65 09 66 66 |aultGrid|Space.ff|
|00000b10| 28 34 38 29 09 2f 2f 20 | 47 72 69 64 20 73 70 61 |(48).// |Grid spa|
|00000b20| 63 69 6e 67 0d 23 64 65 | 66 69 6e 65 20 6b 44 65 |cing.#de|fine kDe|
|00000b30| 66 61 75 6c 74 4a 75 67 | 67 6c 65 72 73 09 32 09 |faultJug|glers.2.|
|00000b40| 09 2f 2f 20 4e 75 6d 62 | 65 72 20 6f 66 20 6a 75 |.// Numb|er of ju|
|00000b50| 67 67 6c 65 72 73 0d 23 | 64 65 66 69 6e 65 20 6b |gglers.#|define k|
|00000b60| 44 65 66 61 75 6c 74 43 | 6f 75 6e 74 73 09 09 36 |DefaultC|ounts..6|
|00000b70| 09 09 2f 2f 20 4e 75 6d | 62 65 72 20 6f 66 20 74 |..// Num|ber of t|
|00000b80| 69 6d 65 20 73 74 65 70 | 73 20 28 68 61 6e 64 73 |ime step|s (hands|
|00000b90| 20 70 65 72 20 6a 75 67 | 67 6c 65 72 29 0d 23 64 | per jug|gler).#d|
|00000ba0| 65 66 69 6e 65 20 6b 4d | 61 78 4a 75 67 67 6c 65 |efine kM|axJuggle|
|00000bb0| 72 73 09 09 32 30 09 09 | 2f 2f 20 4d 61 78 69 6d |rs..20..|// Maxim|
|00000bc0| 75 6d 20 6e 75 6d 62 65 | 72 20 6f 66 20 6a 75 67 |um numbe|r of jug|
|00000bd0| 67 6c 65 72 73 0d 23 64 | 65 66 69 6e 65 20 6b 4d |glers.#d|efine kM|
|00000be0| 61 78 43 6f 75 6e 74 73 | 09 09 09 37 32 09 09 2f |axCounts|...72../|
|00000bf0| 2f 20 4d 61 78 69 6d 75 | 6d 20 6e 75 6d 62 65 72 |/ Maximu|m number|
|00000c00| 20 6f 66 20 63 6f 75 6e | 74 73 20 28 61 72 62 69 | of coun|ts (arbi|
|00000c10| 74 72 61 72 79 2c 20 72 | 65 61 6c 6c 79 2c 20 62 |trary, r|eally, b|
|00000c20| 75 74 20 61 6e 79 20 6d | 6f 72 65 20 77 6f 75 6c |ut any m|ore woul|
|00000c30| 64 20 62 65 20 75 6e 72 | 65 61 73 6f 6e 61 62 6c |d be unr|easonabl|
|00000c40| 65 20 3a 2d 29 0d 23 64 | 65 66 69 6e 65 20 6b 4e |e :-).#d|efine kN|
|00000c50| 75 6d 56 53 65 70 61 72 | 61 74 6f 72 73 09 09 33 |umVSepar|ators..3|
|00000c60| 09 09 2f 2f 20 6e 75 6d | 62 65 72 20 6f 66 20 76 |..// num|ber of v|
|00000c70| 65 72 74 69 63 61 6c 20 | 73 65 70 61 72 61 74 6f |ertical |separato|
|00000c80| 72 73 0d 23 64 65 66 69 | 6e 65 20 6b 48 61 6e 64 |rs.#defi|ne kHand|
|00000c90| 54 65 78 74 53 69 7a 65 | 09 09 28 66 66 28 31 36 |TextSize|..(ff(16|
|00000ca0| 29 29 0d 23 64 65 66 69 | 6e 65 20 6b 4c 61 62 65 |)).#defi|ne kLabe|
|00000cb0| 6c 54 65 78 74 53 69 7a | 65 09 09 28 66 66 28 39 |lTextSiz|e..(ff(9|
|00000cc0| 29 29 09 0d 23 64 65 66 | 69 6e 65 20 6b 54 68 72 |))..#def|ine kThr|
|00000cd0| 6f 77 44 65 74 65 6e 74 | 09 09 28 66 66 28 31 38 |owDetent|..(ff(18|
|00000ce0| 29 29 09 2f 2f 20 64 69 | 73 74 61 6e 63 65 20 66 |)).// di|stance f|
|00000cf0| 72 6f 6d 20 77 68 69 63 | 68 20 61 20 74 68 72 6f |rom whic|h a thro|
|00000d00| 77 20 22 6c 65 61 70 73 | 22 20 74 6f 20 74 68 65 |w "leaps|" to the|
|00000d10| 20 68 61 6e 64 0d 23 64 | 65 66 69 6e 65 20 6b 48 | hand.#d|efine kH|
|00000d20| 61 6e 64 52 61 64 69 75 | 73 09 09 09 28 66 66 28 |andRadiu|s...(ff(|
|00000d30| 38 29 29 09 09 2f 2f 20 | 54 68 65 20 64 69 73 74 |8))..// |The dist|
|00000d40| 61 6e 63 65 20 61 20 70 | 6f 69 6e 74 20 63 61 6e |ance a p|oint can|
|00000d50| 20 62 65 20 61 77 61 79 | 20 66 72 6f 6d 20 74 68 | be away| from th|
|00000d60| 65 20 63 65 6e 74 65 72 | 20 6f 66 20 61 20 68 61 |e center| of a ha|
|00000d70| 6e 64 0d 09 09 09 09 09 | 09 09 09 09 09 2f 2f 20 |nd......|.....// |
|00000d80| 61 6e 64 20 73 74 69 6c | 6c 20 62 65 20 63 6f 6e |and stil|l be con|
|00000d90| 73 69 64 65 72 65 64 20 | 69 6e 73 69 64 65 20 69 |sidered |inside i|
|00000da0| 74 2c 20 75 73 65 64 20 | 66 6f 72 20 66 61 73 74 |t, used |for fast|
|00000db0| 20 68 69 74 20 74 65 73 | 74 69 6e 67 0d 09 09 09 | hit tes|ting....|
|00000dc0| 09 09 09 09 09 09 09 2f | 2f 20 61 6e 64 20 66 6f |......./|/ and fo|
|00000dd0| 72 20 6f 66 66 73 65 74 | 74 69 6e 67 20 61 20 74 |r offset|ting a t|
|00000de0| 68 72 6f 77 27 73 20 63 | 6f 6f 72 64 73 0d 09 0d |hrow's c|oords...|
|00000df0| 0d 2f 2f 20 52 65 73 6f | 75 72 63 65 73 0d 23 64 |.// Reso|urces.#d|
|00000e00| 65 66 69 6e 65 20 6b 54 | 68 75 6d 62 43 75 72 73 |efine kT|humbCurs|
|00000e10| 6f 72 49 44 09 09 31 32 | 38 0d 2f 2f 20 23 64 65 |orID..12|8.// #de|
|00000e20| 66 69 6e 65 20 6b 54 69 | 6d 65 53 6c 69 70 43 75 |fine kTi|meSlipCu|
|00000e30| 72 73 6f 72 49 44 09 31 | 32 39 20 2f 2f 20 53 6f |rsorID.1|29 // So|
|00000e40| 6d 65 64 61 79 20 49 27 | 6c 6c 20 75 73 65 20 74 |meday I'|ll use t|
|00000e50| 68 69 73 0d 0d 2f 2f 20 | 46 69 6c 65 20 63 6f 6e |his..// |File con|
|00000e60| 73 74 61 6e 74 73 0d 23 | 64 65 66 69 6e 65 20 6b |stants.#|define k|
|00000e70| 4a 75 67 67 6c 65 46 69 | 6c 65 54 79 70 65 09 09 |JuggleFi|leType..|
|00000e80| 27 4a 55 47 4c 27 0d 23 | 64 65 66 69 6e 65 20 6b |'JUGL'.#|define k|
|00000e90| 4a 75 67 67 6c 65 43 72 | 65 61 74 6f 72 54 79 70 |JuggleCr|eatorTyp|
|00000ea0| 65 09 27 4a 55 47 4c 27 | 0d 0d 2f 2f 20 44 69 61 |e.'JUGL'|..// Dia|
|00000eb0| 6c 6f 67 20 72 65 73 6f | 75 72 63 65 20 69 64 73 |log reso|urce ids|
|00000ec0| 20 61 6e 64 20 69 74 65 | 6d 20 6e 75 6d 62 65 72 | and ite|m number|
|00000ed0| 73 0d 23 64 65 66 69 6e | 65 20 6b 4a 75 67 67 6c |s.#defin|e kJuggl|
|00000ee0| 65 53 69 7a 65 44 69 61 | 6c 6f 67 49 64 20 09 31 |eSizeDia|logId .1|
|00000ef0| 33 30 0d 2f 2f 23 64 65 | 66 69 6e 65 20 09 69 4f |30.//#de|fine .iO|
|00000f00| 4b 42 75 74 74 6f 6e 20 | 09 09 09 31 09 2f 2f 20 |KButton |...1.// |
|00000f10| 74 68 65 73 65 20 61 72 | 65 20 61 6c 72 65 61 64 |these ar|e alread|
|00000f20| 79 20 64 65 66 69 6e 65 | 64 20 69 6e 20 44 69 61 |y define|d in Dia|
|00000f30| 6c 6f 67 55 74 69 6c 73 | 2e 68 0d 2f 2f 23 64 65 |logUtils|.h.//#de|
|00000f40| 66 69 6e 65 20 09 69 43 | 61 6e 63 65 6c 42 75 74 |fine .iC|ancelBut|
|00000f50| 74 6f 6e 20 09 09 32 0d | 2f 2f 23 64 65 66 69 6e |ton ..2.|//#defin|
|00000f60| 65 20 09 69 4f 75 74 6c | 69 6e 65 20 09 09 09 33 |e .iOutl|ine ...3|
|00000f70| 0d 23 64 65 66 69 6e 65 | 20 09 69 4e 75 6d 4a 75 |.#define| .iNumJu|
|00000f80| 67 67 6c 65 72 73 20 09 | 09 34 20 2f 2f 20 54 68 |gglers .|.4 // Th|
|00000f90| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 6a 75 67 67 |e number| of jugg|
|00000fa0| 6c 65 72 73 20 74 65 78 | 74 20 69 74 65 6d 0d 23 |lers tex|t item.#|
|00000fb0| 64 65 66 69 6e 65 20 09 | 69 4e 75 6d 43 6f 75 6e |define .|iNumCoun|
|00000fc0| 74 73 09 20 09 09 35 20 | 2f 2f 20 54 68 65 20 6e |ts. ..5 |// The n|
|00000fd0| 75 6d 62 65 72 20 6f 66 | 20 63 6f 75 6e 74 73 20 |umber of| counts |
|00000fe0| 74 65 78 74 20 69 74 65 | 6d 0d 09 0d 2f 2f 20 4d |text ite|m...// M|
|00000ff0| 65 6e 75 73 20 61 6e 64 | 20 6d 65 6e 75 20 69 74 |enus and| menu it|
|00001000| 65 6d 73 0d 23 64 65 66 | 69 6e 65 20 6b 4e 75 6d |ems.#def|ine kNum|
|00001010| 41 70 70 4d 65 6e 75 73 | 09 09 09 31 0d 0d 23 64 |AppMenus|...1..#d|
|00001020| 65 66 69 6e 65 09 6b 4a | 75 67 67 6c 65 4d 65 6e |efine.kJ|uggleMen|
|00001030| 75 49 44 09 09 09 31 33 | 31 0d 23 64 65 66 69 6e |uID...13|1.#defin|
|00001040| 65 20 09 69 52 65 73 69 | 7a 65 4a 75 67 67 6c 65 |e .iResi|zeJuggle|
|00001050| 09 09 31 0d 23 64 65 66 | 69 6e 65 20 09 69 41 64 |..1.#def|ine .iAd|
|00001060| 64 4a 75 67 67 6c 65 72 | 09 09 09 32 0d 0d 2f 2f |dJuggler|...2..//|
|00001070| 20 6c 6f 63 61 74 69 6f | 6e 20 69 6e 20 74 68 65 | locatio|n in the|
|00001080| 20 67 6c 6f 62 61 6c 20 | 6d 65 6e 75 20 68 61 6e | global |menu han|
|00001090| 64 6c 65 20 61 72 72 61 | 79 0d 23 64 65 66 69 6e |dle arra|y.#defin|
|000010a0| 65 09 6b 4a 75 67 67 6c | 65 4d 65 6e 75 09 09 09 |e.kJuggl|eMenu...|
|000010b0| 09 30 0d 0d 0d 2f 2f 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.0...//-|--------|
|000010c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010d0| 2d 2d 2d 2d 2d 0d 2f 2f | 20 4d 61 63 72 6f 73 0d |-----.//| Macros.|
|000010e0| 0d 23 64 65 66 69 6e 65 | 09 66 69 78 41 62 73 28 |.#define|.fixAbs(|
|000010f0| 61 29 20 28 28 61 20 3c | 20 30 29 20 3f 20 2d 61 |a) ((a <| 0) ? -a|
|00001100| 20 3a 20 61 29 0d 0d 2f | 2f 2d 2d 2d 2d 2d 2d 2d | : a)../|/-------|
|00001110| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001120| 2d 2d 2d 2d 2d 2d 2d 2d | 0d 2f 2f 20 54 79 70 65 |--------|.// Type|
|00001130| 73 0d 0d 2f 2f 20 41 20 | 48 61 6e 64 4c 6f 63 20 |s..// A |HandLoc |
|00001140| 69 73 20 6d 75 63 68 20 | 6c 69 6b 65 20 61 20 70 |is much |like a p|
|00001150| 6f 69 6e 74 2c 20 61 6e | 64 20 73 70 65 63 69 66 |oint, an|d specif|
|00001160| 69 65 73 20 61 20 70 61 | 72 74 69 63 75 6c 61 72 |ies a pa|rticular|
|00001170| 20 68 61 6e 64 20 6c 6f | 63 61 74 69 6f 6e 20 69 | hand lo|cation i|
|00001180| 6e 20 74 68 65 20 0d 2f | 2f 20 61 72 72 61 79 20 |n the ./|/ array |
|00001190| 69 6e 20 6d 65 6d 6f 72 | 79 2e 0d 2f 2f 20 28 4e |in memor|y..// (N|
|000011a0| 6f 74 65 20 74 68 61 74 | 20 74 68 69 73 20 64 6f |ote that| this do|
|000011b0| 65 73 20 6e 6f 74 20 6e | 65 63 65 73 73 61 72 69 |es not n|ecessari|
|000011c0| 6c 79 20 63 6f 72 72 65 | 73 70 6f 6e 64 20 74 6f |ly corre|spond to|
|000011d0| 20 61 6e 79 20 70 61 72 | 74 69 63 75 6c 61 72 20 | any par|ticular |
|000011e0| 70 6f 73 69 74 69 6f 6e | 20 6f 6e 20 20 0d 2f 2f |position| on .//|
|000011f0| 20 73 63 72 65 65 6e 2c | 20 73 69 6e 63 65 20 6a | screen,| since j|
|00001200| 75 67 67 6c 65 72 73 20 | 63 61 6e 20 62 65 20 72 |ugglers |can be r|
|00001210| 65 61 72 72 61 6e 67 65 | 64 20 2d 20 69 2e 65 2e |earrange|d - i.e.|
|00001220| 20 6a 75 67 67 6c 65 72 | 20 31 20 6d 61 79 20 62 | juggler| 1 may b|
|00001230| 65 20 74 68 72 65 65 20 | 72 6f 77 73 20 64 6f 77 |e three |rows dow|
|00001240| 6e 29 0d 2f 2f 20 56 61 | 6c 75 65 73 20 61 72 65 |n).// Va|lues are|
|00001250| 20 61 6c 77 61 79 73 20 | 70 6f 73 69 74 69 76 65 | always |positive|
|00001260| 20 28 31 2d 62 61 73 65 | 64 29 20 2d 20 7a 65 72 | (1-base|d) - zer|
|00001270| 6f 20 73 69 67 6e 69 66 | 69 65 73 20 22 6e 6f 6e |o signif|ies "non|
|00001280| 65 22 0d 74 79 70 65 64 | 65 66 20 73 74 72 75 63 |e".typed|ef struc|
|00001290| 74 20 48 61 6e 64 4c 6f | 63 0d 7b 0d 09 73 68 6f |t HandLo|c.{..sho|
|000012a0| 72 74 09 74 69 6d 65 3b | 0d 09 73 68 6f 72 74 09 |rt.time;|..short.|
|000012b0| 6a 75 67 67 6c 65 72 3b | 0d 7d 48 61 6e 64 4c 6f |juggler;|.}HandLo|
|000012c0| 63 2c 20 2a 48 61 6e 64 | 4c 6f 63 50 74 72 3b 0d |c, *Hand|LocPtr;.|
|000012d0| 0d 2f 2f 20 41 20 48 61 | 6e 64 20 69 73 20 6a 75 |.// A Ha|nd is ju|
|000012e0| 73 74 20 61 20 70 61 69 | 72 20 6f 66 20 48 61 6e |st a pai|r of Han|
|000012f0| 64 4c 6f 63 73 2c 20 73 | 70 65 63 69 66 79 69 6e |dLocs, s|pecifyin|
|00001300| 67 20 74 68 65 20 73 6f | 75 72 63 65 20 61 6e 64 |g the so|urce and|
|00001310| 20 73 69 6e 6b 20 66 6f | 72 20 74 68 65 20 68 61 | sink fo|r the ha|
|00001320| 6e 64 2e 0d 2f 2f 20 49 | 6e 20 61 20 22 63 6f 6d |nd..// I|n a "com|
|00001330| 70 6c 65 74 65 22 20 70 | 61 74 74 65 72 6e 2c 20 |plete" p|attern, |
|00001340| 65 76 65 72 79 20 68 61 | 6e 64 20 6d 75 73 74 20 |every ha|nd must |
|00001350| 68 61 76 65 20 42 4f 54 | 48 20 61 20 73 6f 75 72 |have BOT|H a sour|
|00001360| 63 65 20 61 6e 64 20 61 | 20 73 69 6e 6b 0d 74 79 |ce and a| sink.ty|
|00001370| 70 65 64 65 66 20 73 74 | 72 75 63 74 20 48 61 6e |pedef st|ruct Han|
|00001380| 64 0d 7b 0d 09 48 61 6e | 64 4c 6f 63 09 73 6f 75 |d.{..Han|dLoc.sou|
|00001390| 72 63 65 3b 0d 09 48 61 | 6e 64 4c 6f 63 09 73 69 |rce;..Ha|ndLoc.si|
|000013a0| 6e 6b 3b 0d 7d 20 48 61 | 6e 64 2c 20 2a 48 61 6e |nk;.} Ha|nd, *Han|
|000013b0| 64 50 74 72 2c 20 2a 2a | 48 61 6e 64 48 61 6e 64 |dPtr, **|HandHand|
|000013c0| 6c 65 3b 0d 0d 2f 2a 20 | 54 68 69 73 20 73 74 72 |le;../* |This str|
|000013d0| 75 63 74 75 72 65 20 72 | 65 70 72 65 73 65 6e 74 |ucture r|epresent|
|000013e0| 73 20 65 61 63 68 20 22 | 64 6f 63 75 6d 65 6e 74 |s each "|document|
|000013f0| 22 2e 20 54 68 65 20 46 | 53 53 70 65 63 20 69 73 |". The F|SSpec is|
|00001400| 20 75 73 65 64 20 74 6f | 20 6b 65 65 70 20 74 72 | used to| keep tr|
|00001410| 61 63 6b 20 6f 66 20 77 | 68 65 74 68 65 72 0d 09 |ack of w|hether..|
|00001420| 61 20 53 61 76 65 20 63 | 6f 6d 6d 61 6e 64 20 73 |a Save c|ommand s|
|00001430| 68 6f 75 6c 64 20 63 61 | 6c 6c 20 53 61 76 65 20 |hould ca|ll Save |
|00001440| 41 73 2c 20 61 6e 64 20 | 69 66 20 6e 6f 74 20 77 |As, and |if not w|
|00001450| 68 69 63 68 20 66 69 6c | 65 20 74 6f 20 73 61 76 |hich fil|e to sav|
|00001460| 65 20 69 6e 74 6f 2e 20 | 54 68 65 20 64 69 72 74 |e into. |The dirt|
|00001470| 79 0d 09 66 6c 61 67 20 | 69 73 20 75 73 65 64 20 |y..flag |is used |
|00001480| 74 6f 20 6b 65 65 70 20 | 74 72 61 63 6b 20 6f 66 |to keep |track of|
|00001490| 20 77 68 65 6e 20 73 61 | 76 69 6e 67 20 69 73 20 | when sa|ving is |
|000014a0| 6e 65 63 65 73 73 61 72 | 79 2e 20 54 68 65 20 73 |necessar|y. The s|
|000014b0| 63 72 6f 6c 6c 20 62 61 | 72 73 20 61 72 65 20 74 |croll ba|rs are t|
|000014c0| 68 65 20 73 63 72 6f 6c | 6c 0d 09 62 61 72 73 2e |he scrol|l..bars.|
|000014d0| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 53 69 7a 65 | the con|tentSize|
|000014e0| 20 69 73 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 | is the |size of |
|000014f0| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 2c 20 69 6e |the docu|ment, in|
|00001500| 20 70 69 78 65 6c 73 2e | 20 54 68 65 20 4a 75 67 | pixels.| The Jug|
|00001510| 67 6c 65 20 73 74 75 66 | 66 20 69 73 20 74 68 65 |gle stuf|f is the|
|00001520| 20 0d 09 6a 75 67 67 6c | 65 20 73 74 75 66 66 2e | ..juggl|e stuff.|
|00001530| 20 2a 2f 0d 74 79 70 65 | 64 65 66 20 73 74 72 75 | */.type|def stru|
|00001540| 63 74 0d 7b 0d 09 2f 2f | 20 53 74 61 6e 64 61 72 |ct.{..//| Standar|
|00001550| 64 20 73 68 65 6c 6c 20 | 73 74 75 66 66 0d 09 50 |d shell |stuff..P|
|00001560| 6f 69 6e 74 09 09 09 63 | 6f 6e 74 65 6e 74 53 69 |oint...c|ontentSi|
|00001570| 7a 65 3b 0d 09 43 6f 6e | 74 72 6f 6c 48 61 6e 64 |ze;..Con|trolHand|
|00001580| 6c 65 09 68 53 63 72 6f | 6c 6c 3b 0d 09 43 6f 6e |le.hScro|ll;..Con|
|00001590| 74 72 6f 6c 48 61 6e 64 | 6c 65 09 76 53 63 72 6f |trolHand|le.vScro|
|000015a0| 6c 6c 3b 0d 09 46 53 53 | 70 65 63 09 09 09 66 69 |ll;..FSS|pec...fi|
|000015b0| 6c 65 53 70 65 63 3b 0d | 09 42 6f 6f 6c 65 61 6e |leSpec;.|.Boolean|
|000015c0| 09 09 09 64 69 72 74 79 | 3b 0d 09 0d 09 2f 2f 20 |...dirty|;....// |
|000015d0| 53 74 61 6e 64 61 72 64 | 20 47 58 20 73 74 75 66 |Standard| GX stuf|
|000015e0| 66 0d 09 67 78 4a 6f 62 | 09 09 09 64 6f 63 4a 6f |f..gxJob|...docJo|
|000015f0| 62 3b 09 09 09 2f 2f 20 | 70 72 69 6e 74 20 6a 6f |b;...// |print jo|
|00001600| 62 20 66 6f 72 20 74 68 | 69 73 20 64 6f 63 75 6d |b for th|is docum|
|00001610| 65 6e 74 2e 0d 09 67 78 | 53 68 61 70 65 09 09 09 |ent...gx|Shape...|
|00001620| 64 6f 63 50 61 67 65 3b | 09 09 2f 2f 20 70 61 67 |docPage;|..// pag|
|00001630| 65 20 73 68 61 70 65 20 | 64 65 73 63 72 69 70 74 |e shape |descript|
|00001640| 69 6f 6e 2e 0d 09 67 78 | 56 69 65 77 50 6f 72 74 |ion...gx|ViewPort|
|00001650| 09 09 64 6f 63 50 6f 72 | 74 3b 09 09 2f 2f 20 54 |..docPor|t;..// T|
|00001660| 68 65 20 63 68 69 6c 64 | 20 6f 66 20 74 68 65 20 |he child| of the |
|00001670| 77 69 6e 64 6f 77 27 73 | 20 76 69 65 77 20 70 6f |window's| view po|
|00001680| 72 74 2c 20 75 73 65 64 | 20 66 6f 72 20 73 63 72 |rt, used| for scr|
|00001690| 6f 6c 6c 69 6e 67 0d 09 | 0d 09 2f 2f 20 54 68 65 |olling..|..// The|
|000016a0| 20 4a 75 67 67 6c 65 0d | 09 0d 09 2f 2f 20 2d 2d | Juggle.|...// --|
|000016b0| 2d 2d a5 20 47 72 61 70 | 68 69 63 73 20 73 74 75 |--. Grap|hics stu|
|000016c0| 66 66 20 a5 2d 2d 2d 2d | 0d 0d 09 2f 2f 20 54 68 |ff .----|...// Th|
|000016d0| 65 20 66 61 64 65 64 20 | 76 69 65 77 20 70 6f 72 |e faded |view por|
|000016e0| 74 73 0d 09 67 78 56 69 | 65 77 50 6f 72 74 09 61 |ts..gxVi|ewPort.a|
|000016f0| 66 74 65 72 50 6f 72 74 | 3b 20 09 09 2f 2f 20 74 |fterPort|; ..// t|
|00001700| 68 65 20 76 69 65 77 20 | 70 6f 72 74 20 66 6f 72 |he view |port for|
|00001710| 20 64 72 61 77 69 6e 67 | 20 67 68 6f 73 74 20 74 | drawing| ghost t|
|00001720| 68 72 6f 77 73 20 74 6f | 20 74 68 65 20 72 69 67 |hrows to| the rig|
|00001730| 68 74 0d 09 09 09 09 09 | 09 09 09 2f 2f 20 6f 66 |ht......|...// of|
|00001740| 20 74 68 65 20 6d 61 69 | 6e 20 68 61 6e 64 73 0d | the mai|n hands.|
|00001750| 09 67 78 56 69 65 77 50 | 6f 72 74 09 62 65 66 6f |.gxViewP|ort.befo|
|00001760| 72 65 50 6f 72 74 3b 20 | 09 2f 2f 20 74 68 65 20 |rePort; |.// the |
|00001770| 76 69 65 77 20 70 6f 72 | 74 20 66 6f 72 20 64 72 |view por|t for dr|
|00001780| 61 77 69 6e 67 20 67 68 | 6f 73 74 20 74 68 72 6f |awing gh|ost thro|
|00001790| 77 73 20 74 68 61 74 20 | 63 6f 6d 65 20 69 6e 0d |ws that |come in.|
|000017a0| 09 09 09 09 09 09 09 09 | 2f 2f 20 66 72 6f 6d 20 |........|// from |
|000017b0| 74 68 65 20 6c 65 66 74 | 20 74 6f 20 74 68 65 20 |the left| to the |
|000017c0| 6d 61 69 6e 20 68 61 6e | 64 73 2e 0d 0d 09 2f 2f |main han|ds....//|
|000017d0| 20 54 68 65 20 73 68 61 | 70 65 73 0d 09 67 78 53 | The sha|pes..gxS|
|000017e0| 68 61 70 65 20 09 6a 75 | 67 67 6c 65 72 73 50 69 |hape .ju|gglersPi|
|000017f0| 63 74 3b 09 2f 2f 20 70 | 69 63 74 75 72 65 20 63 |ct;.// p|icture c|
|00001800| 6f 6e 74 61 69 6e 69 6e | 67 20 74 68 65 20 6a 75 |ontainin|g the ju|
|00001810| 67 67 6c 65 72 73 0d 09 | 67 78 53 68 61 70 65 09 |gglers..|gxShape.|
|00001820| 09 74 68 72 6f 77 73 50 | 69 63 74 3b 09 09 2f 2f |.throwsP|ict;..//|
|00001830| 20 70 69 63 74 75 72 65 | 20 63 6f 6e 74 61 69 6e | picture| contain|
|00001840| 69 6e 67 20 61 6c 6c 20 | 74 68 65 20 74 68 72 6f |ing all |the thro|
|00001850| 77 73 20 28 61 72 72 6f | 77 73 29 0d 09 67 78 53 |ws (arro|ws)..gxS|
|00001860| 68 61 70 65 09 09 66 61 | 64 65 64 54 68 72 6f 77 |hape..fa|dedThrow|
|00001870| 73 50 69 63 74 3b 2f 2f | 20 70 69 63 74 75 72 65 |sPict;//| picture|
|00001880| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 61 6c 6c 20 | contain|ing all |
|00001890| 74 68 65 20 67 68 6f 73 | 74 20 74 68 72 6f 77 73 |the ghos|t throws|
|000018a0| 0d 09 67 78 53 68 61 70 | 65 09 09 73 65 70 73 50 |..gxShap|e..sepsP|
|000018b0| 69 63 74 3b 09 09 2f 2f | 20 70 69 63 74 75 72 65 |ict;..//| picture|
|000018c0| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 61 6c 6c 20 | contain|ing all |
|000018d0| 74 68 65 20 73 65 70 61 | 72 61 74 6f 72 20 6c 69 |the sepa|rator li|
|000018e0| 6e 65 73 20 69 6e 20 74 | 68 65 20 6a 75 67 67 6c |nes in t|he juggl|
|000018f0| 65 0d 0d 09 2f 2f 20 2d | 2d 2d 2d a5 20 4e 6f 6e |e...// -|---. Non|
|00001900| 2d 67 72 61 70 68 69 63 | 73 20 73 74 75 66 66 20 |-graphic|s stuff |
|00001910| a5 2d 2d 2d 2d 0d 09 0d | 09 2f 2f 20 41 6e 20 61 |.----...|.// An a|
|00001920| 72 72 61 79 20 6f 66 20 | 73 68 6f 72 74 73 20 75 |rray of |shorts u|
|00001930| 73 65 64 20 74 6f 20 6d | 61 70 20 70 6f 73 69 74 |sed to m|ap posit|
|00001940| 69 6f 6e 20 6f 6e 20 73 | 63 72 65 65 6e 20 74 6f |ion on s|creen to|
|00001950| 20 74 68 65 20 61 63 74 | 75 61 6c 20 6a 75 67 67 | the act|ual jugg|
|00001960| 6c 65 72 20 72 6f 77 20 | 69 6e 20 6d 65 6d 6f 72 |ler row |in memor|
|00001970| 79 2e 0d 09 2f 2f 20 50 | 6f 73 69 74 69 6f 6e 20 |y...// P|osition |
|00001980| 69 6e 20 74 68 65 20 61 | 72 72 61 79 20 63 6f 72 |in the a|rray cor|
|00001990| 72 65 73 70 6f 6e 64 73 | 20 74 6f 20 70 6f 73 69 |responds| to posi|
|000019a0| 74 69 6f 6e 20 6f 6e 20 | 73 63 72 65 65 6e 2c 20 |tion on |screen, |
|000019b0| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 61 6e 20 |the valu|e of an |
|000019c0| 61 72 72 61 79 20 73 6c | 6f 74 0d 09 2f 2f 20 69 |array sl|ot..// i|
|000019d0| 73 20 74 68 65 20 72 6f | 77 20 6f 66 20 74 68 65 |s the ro|w of the|
|000019e0| 20 6a 75 67 67 6c 65 72 | 20 6f 63 63 75 70 79 69 | juggler| occupyi|
|000019f0| 6e 67 20 74 68 61 74 20 | 70 6f 73 69 74 69 6f 6e |ng that |position|
|00001a00| 20 6f 6e 20 73 63 72 65 | 65 6e 2e 0d 09 73 68 6f | on scre|en...sho|
|00001a10| 72 74 20 09 09 6a 75 67 | 67 6c 65 72 4d 61 70 5b |rt ..jug|glerMap[|
|00001a20| 6b 4d 61 78 4a 75 67 67 | 6c 65 72 73 5d 3b 0d 0d |kMaxJugg|lers];..|
|00001a30| 09 0d 09 2f 2f 20 53 74 | 61 74 65 20 76 61 72 69 |...// St|ate vari|
|00001a40| 61 62 6c 65 73 0d 09 67 | 78 50 6f 69 6e 74 09 09 |ables..g|xPoint..|
|00001a50| 67 72 69 64 50 74 3b 09 | 09 09 2f 2f 20 54 68 65 |gridPt;.|..// The|
|00001a60| 20 67 72 69 64 20 73 70 | 61 63 69 6e 67 20 69 6e | grid sp|acing in|
|00001a70| 20 37 32 6e 64 73 20 6f | 66 20 61 6e 20 69 6e 63 | 72nds o|f an inc|
|00001a80| 68 0d 09 73 68 6f 72 74 | 09 09 6e 75 6d 4a 75 67 |h..short|..numJug|
|00001a90| 67 6c 65 72 73 3b 09 2f | 2f 20 6e 75 6d 62 65 72 |glers;./|/ number|
|00001aa0| 20 6f 66 20 6a 75 67 67 | 6c 65 72 73 20 28 72 6f | of jugg|lers (ro|
|00001ab0| 77 73 29 0d 09 73 68 6f | 72 74 09 09 6e 75 6d 43 |ws)..sho|rt..numC|
|00001ac0| 6f 75 6e 74 73 3b 09 09 | 2f 2f 20 6e 75 6d 62 65 |ounts;..|// numbe|
|00001ad0| 72 20 6f 66 20 74 69 6d | 65 20 73 74 65 70 73 20 |r of tim|e steps |
|00001ae0| 28 63 6f 6c 75 6d 6e 73 | 29 0d 09 0d 09 2f 2f 20 |(columns|)....// |
|00001af0| 54 68 65 20 63 6f 6e 6e | 65 63 74 69 6f 6e 73 20 |The conn|ections |
|00001b00| 64 61 74 61 20 69 73 20 | 61 20 32 44 20 61 72 72 |data is |a 2D arr|
|00001b10| 61 79 20 6f 66 20 68 61 | 6e 64 73 2e 20 48 6f 77 |ay of ha|nds. How|
|00001b20| 20 62 69 67 20 74 68 65 | 20 61 72 72 61 79 20 69 | big the| array i|
|00001b30| 73 0d 09 2f 2f 20 77 69 | 6c 6c 20 76 61 72 79 20 |s..// wi|ll vary |
|00001b40| 64 65 70 65 6e 64 69 6e | 67 20 6f 6e 20 74 68 65 |dependin|g on the|
|00001b50| 20 6e 75 6d 62 65 72 20 | 6f 66 20 6a 75 67 67 6c | number |of juggl|
|00001b60| 65 72 73 20 61 6e 64 20 | 74 68 65 20 6e 75 6d 62 |ers and |the numb|
|00001b70| 65 72 20 6f 66 20 74 69 | 6d 65 0d 09 2f 2f 20 73 |er of ti|me..// s|
|00001b80| 74 65 70 73 2e 20 48 6f | 77 20 74 68 65 20 68 61 |teps. Ho|w the ha|
|00001b90| 6e 64 73 20 61 72 65 20 | 6c 69 6e 6b 65 64 20 75 |nds are |linked u|
|00001ba0| 70 20 28 74 68 65 20 70 | 61 74 74 65 72 6e 20 69 |p (the p|attern i|
|00001bb0| 74 73 65 6c 66 29 20 0d | 09 2f 2f 20 69 73 20 64 |tself) .|.// is d|
|00001bc0| 65 74 65 72 6d 69 6e 65 | 64 20 62 79 20 74 68 65 |etermine|d by the|
|00001bd0| 20 64 61 74 61 20 69 6e | 20 74 68 65 20 48 61 6e | data in| the Han|
|00001be0| 64 73 2e 0d 09 48 61 6e | 64 48 61 6e 64 6c 65 09 |ds...Han|dHandle.|
|00001bf0| 09 74 68 65 54 68 72 6f | 77 73 3b 0d 09 0d 7d 44 |.theThro|ws;...}D|
|00001c00| 6f 63 75 6d 65 6e 74 52 | 65 63 6f 72 64 2c 20 2a |ocumentR|ecord, *|
|00001c10| 44 6f 63 50 65 65 6b 2c | 20 2a 2a 44 6f 63 48 61 |DocPeek,| **DocHa|
|00001c20| 6e 64 6c 65 2c 20 4a 75 | 67 67 6c 65 2c 20 2a 4a |ndle, Ju|ggle, *J|
|00001c30| 75 67 67 6c 65 50 6f 69 | 6e 74 65 72 2c 20 2a 2a |ugglePoi|nter, **|
|00001c40| 4a 75 67 67 6c 65 48 61 | 6e 64 6c 65 3b 0d 0d 0d |JuggleHa|ndle;...|
|00001c50| 2f 2f 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |//------|--------|
|00001c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c70| 0d 2f 2f 20 50 72 6f 74 | 6f 74 79 70 65 73 0d 0d |.// Prot|otypes..|
|00001c80| 2f 2f 20 2d 2d 2d 2d a5 | 20 4a 75 67 67 6c 65 52 |// ----.| JuggleR|
|00001c90| 6f 75 74 69 6e 65 73 2e | 63 20 a5 2d 2d 2d 2d 0d |outines.|c .----.|
|00001ca0| 0d 2f 2f 20 49 6e 69 74 | 20 61 6e 64 20 43 6c 65 |.// Init| and Cle|
|00001cb0| 61 6e 55 70 0d 4f 53 45 | 72 72 09 09 09 09 49 6e |anUp.OSE|rr....In|
|00001cc0| 69 74 4a 75 67 67 6c 65 | 28 57 69 6e 64 6f 77 50 |itJuggle|(WindowP|
|00001cd0| 74 72 20 77 69 6e 64 2c | 20 73 68 6f 72 74 20 6e |tr wind,| short n|
|00001ce0| 75 6d 4a 75 67 67 6c 65 | 72 73 2c 20 73 68 6f 72 |umJuggle|rs, shor|
|00001cf0| 74 20 6e 75 6d 43 6f 75 | 6e 74 73 29 3b 0d 76 6f |t numCou|nts);.vo|
|00001d00| 69 64 09 09 09 09 43 6c | 65 61 6e 55 70 4a 75 67 |id....Cl|eanUpJug|
|00001d10| 67 6c 65 28 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |gle(Wind|owPtr wi|
|00001d20| 6e 64 6f 77 2c 20 42 6f | 6f 6c 65 61 6e 20 67 72 |ndow, Bo|olean gr|
|00001d30| 61 70 68 69 63 73 54 6f | 6f 29 3b 0d 0d 2f 2f 20 |aphicsTo|o);..// |
|00001d40| 61 63 63 65 73 73 6f 72 | 20 72 6f 75 74 69 6e 65 |accessor| routine|
|00001d50| 73 20 66 6f 72 20 74 68 | 65 20 6a 75 67 67 6c 65 |s for th|e juggle|
|00001d60| 20 73 74 75 66 66 20 69 | 6e 20 74 68 65 20 77 69 | stuff i|n the wi|
|00001d70| 6e 64 6f 77 0d 44 6f 63 | 48 61 6e 64 6c 65 09 09 |ndow.Doc|Handle..|
|00001d80| 09 47 65 74 57 69 6e 64 | 6f 77 44 6f 63 28 57 69 |.GetWind|owDoc(Wi|
|00001d90| 6e 64 6f 77 50 74 72 20 | 77 69 6e 64 29 3b 0d 4a |ndowPtr |wind);.J|
|00001da0| 75 67 67 6c 65 48 61 6e | 64 6c 65 09 09 47 65 74 |uggleHan|dle..Get|
|00001db0| 57 69 6e 64 6f 77 4a 75 | 67 67 6c 65 28 57 69 6e |WindowJu|ggle(Win|
|00001dc0| 64 6f 77 50 74 72 20 77 | 69 6e 64 29 3b 0d 0d 2f |dowPtr w|ind);../|
|00001dd0| 2f 20 74 68 72 6f 77 20 | 6d 61 6e 69 70 75 6c 61 |/ throw |manipula|
|00001de0| 74 69 6f 6e 20 72 6f 75 | 74 69 6e 65 73 0d 42 6f |tion rou|tines.Bo|
|00001df0| 6f 6c 65 61 6e 20 09 09 | 09 52 65 73 69 7a 65 54 |olean ..|.ResizeT|
|00001e00| 68 72 6f 77 73 28 4a 75 | 67 67 6c 65 48 61 6e 64 |hrows(Ju|ggleHand|
|00001e10| 6c 65 20 61 4a 75 67 67 | 6c 65 2c 20 73 68 6f 72 |le aJugg|le, shor|
|00001e20| 74 20 6e 75 6d 4a 75 67 | 67 6c 65 72 73 2c 20 73 |t numJug|glers, s|
|00001e30| 68 6f 72 74 20 6e 75 6d | 43 6f 75 6e 74 73 2c 0d |hort num|Counts,.|
|00001e40| 09 09 09 09 09 09 09 09 | 09 09 42 6f 6f 6c 65 61 |........|..Boolea|
|00001e50| 6e 20 63 6f 70 79 54 68 | 72 6f 77 73 29 3b 0d 48 |n copyTh|rows);.H|
|00001e60| 61 6e 64 50 74 72 09 09 | 09 09 47 65 74 48 61 6e |andPtr..|..GetHan|
|00001e70| 64 50 74 72 28 48 61 6e | 64 48 61 6e 64 6c 65 20 |dPtr(Han|dHandle |
|00001e80| 74 68 72 6f 77 73 2c 20 | 73 68 6f 72 74 20 6e 75 |throws, |short nu|
|00001e90| 6d 43 6f 75 6e 74 73 2c | 20 73 68 6f 72 74 20 6a |mCounts,| short j|
|00001ea0| 75 67 67 6c 65 72 2c 20 | 73 68 6f 72 74 20 63 6f |uggler, |short co|
|00001eb0| 75 6e 74 29 3b 0d 48 61 | 6e 64 50 74 72 09 09 09 |unt);.Ha|ndPtr...|
|00001ec0| 09 47 65 74 48 61 6e 64 | 28 4a 75 67 67 6c 65 48 |.GetHand|(JuggleH|
|00001ed0| 61 6e 64 6c 65 20 61 4a | 75 67 67 6c 65 2c 20 48 |andle aJ|uggle, H|
|00001ee0| 61 6e 64 4c 6f 63 20 74 | 68 65 4c 6f 63 2c 20 42 |andLoc t|heLoc, B|
|00001ef0| 6f 6f 6c 65 61 6e 20 77 | 72 61 70 49 74 29 3b 0d |oolean w|rapIt);.|
|00001f00| 48 61 6e 64 50 74 72 09 | 09 09 09 47 65 74 49 6e |HandPtr.|...GetIn|
|00001f10| 64 65 78 65 64 48 61 6e | 64 28 4a 75 67 67 6c 65 |dexedHan|d(Juggle|
|00001f20| 48 61 6e 64 6c 65 20 61 | 4a 75 67 67 6c 65 2c 20 |Handle a|Juggle, |
|00001f30| 73 68 6f 72 74 20 74 69 | 6d 65 2c 20 73 68 6f 72 |short ti|me, shor|
|00001f40| 74 20 6a 75 67 67 6c 65 | 72 2c 0d 09 09 09 09 09 |t juggle|r,......|
|00001f50| 09 09 09 09 42 6f 6f 6c | 65 61 6e 20 77 72 61 70 |....Bool|ean wrap|
|00001f60| 49 74 29 3b 0d 0d 76 6f | 69 64 09 09 09 09 41 64 |It);..vo|id....Ad|
|00001f70| 64 54 68 72 6f 77 28 4a | 75 67 67 6c 65 48 61 6e |dThrow(J|uggleHan|
|00001f80| 64 6c 65 20 61 4a 75 67 | 67 6c 65 2c 20 48 61 6e |dle aJug|gle, Han|
|00001f90| 64 4c 6f 63 20 66 72 6f | 6d 2c 20 48 61 6e 64 4c |dLoc fro|m, HandL|
|00001fa0| 6f 63 20 74 6f 29 3b 0d | 76 6f 69 64 09 09 09 09 |oc to);.|void....|
|00001fb0| 41 64 64 49 6e 64 65 78 | 65 64 54 68 72 6f 77 28 |AddIndex|edThrow(|
|00001fc0| 4a 75 67 67 6c 65 48 61 | 6e 64 6c 65 20 61 4a 75 |JuggleHa|ndle aJu|
|00001fd0| 67 67 6c 65 2c 0d 09 09 | 09 09 09 09 73 68 6f 72 |ggle,...|....shor|
|00001fe0| 74 20 66 72 6f 6d 54 69 | 6d 65 2c 20 73 68 6f 72 |t fromTi|me, shor|
|00001ff0| 74 20 66 72 6f 6d 4a 75 | 67 67 6c 65 72 2c 0d 09 |t fromJu|ggler,..|
|00002000| 09 09 09 09 09 73 68 6f | 72 74 20 74 6f 54 69 6d |.....sho|rt toTim|
|00002010| 65 2c 20 73 68 6f 72 74 | 20 74 6f 4a 75 67 67 6c |e, short| toJuggl|
|00002020| 65 72 09 29 3b 0d 0d 76 | 6f 69 64 09 09 09 09 52 |er.);..v|oid....R|
|00002030| 65 6d 6f 76 65 54 68 72 | 6f 77 28 4a 75 67 67 6c |emoveThr|ow(Juggl|
|00002040| 65 48 61 6e 64 6c 65 20 | 61 4a 75 67 67 6c 65 2c |eHandle |aJuggle,|
|00002050| 20 48 61 6e 64 4c 6f 63 | 20 66 72 6f 6d 2c 20 48 | HandLoc| from, H|
|00002060| 61 6e 64 4c 6f 63 20 74 | 6f 29 3b 0d 76 6f 69 64 |andLoc t|o);.void|
|00002070| 09 09 09 09 52 65 6d 6f | 76 65 49 6e 64 65 78 65 |....Remo|veIndexe|
|00002080| 64 54 68 72 6f 77 28 4a | 75 67 67 6c 65 48 61 6e |dThrow(J|uggleHan|
|00002090| 64 6c 65 20 61 4a 75 67 | 67 6c 65 2c 0d 09 09 09 |dle aJug|gle,....|
|000020a0| 09 09 09 73 68 6f 72 74 | 20 66 72 6f 6d 54 69 6d |...short| fromTim|
|000020b0| 65 2c 20 73 68 6f 72 74 | 20 66 72 6f 6d 4a 75 67 |e, short| fromJug|
|000020c0| 67 6c 65 72 2c 0d 09 09 | 09 09 09 09 73 68 6f 72 |gler,...|....shor|
|000020d0| 74 20 74 6f 54 69 6d 65 | 2c 20 73 68 6f 72 74 20 |t toTime|, short |
|000020e0| 74 6f 4a 75 67 67 6c 65 | 72 09 29 3b 0d 0d 76 6f |toJuggle|r.);..vo|
|000020f0| 69 64 09 09 09 09 43 6c | 65 61 72 4a 75 67 67 6c |id....Cl|earJuggl|
|00002100| 65 72 54 68 72 6f 77 73 | 28 4a 75 67 67 6c 65 48 |erThrows|(JuggleH|
|00002110| 61 6e 64 6c 65 20 61 4a | 75 67 67 6c 65 2c 20 73 |andle aJ|uggle, s|
|00002120| 68 6f 72 74 20 6a 75 67 | 67 6c 65 72 29 3b 0d 76 |hort jug|gler);.v|
|00002130| 6f 69 64 20 09 09 09 09 | 43 6f 70 79 54 68 72 6f |oid ....|CopyThro|
|00002140| 77 73 28 48 61 6e 64 48 | 61 6e 64 6c 65 20 6f 6c |ws(HandH|andle ol|
|00002150| 64 54 68 72 6f 77 73 2c | 20 73 68 6f 72 74 20 6f |dThrows,| short o|
|00002160| 6c 64 4a 75 67 67 6c 65 | 72 73 2c 20 73 68 6f 72 |ldJuggle|rs, shor|
|00002170| 74 20 6f 6c 64 43 6f 75 | 6e 74 73 2c 0d 09 09 09 |t oldCou|nts,....|
|00002180| 09 09 09 09 09 48 61 6e | 64 48 61 6e 64 6c 65 20 |.....Han|dHandle |
|00002190| 6e 65 77 54 68 72 6f 77 | 73 2c 20 73 68 6f 72 74 |newThrow|s, short|
|000021a0| 20 6e 65 77 4a 75 67 67 | 6c 65 72 73 2c 20 73 68 | newJugg|lers, sh|
|000021b0| 6f 72 74 20 6e 65 77 43 | 6f 75 6e 74 73 29 3b 0d |ort newC|ounts);.|
|000021c0| 48 61 6e 64 4c 6f 63 09 | 09 09 09 46 69 6e 64 52 |HandLoc.|...FindR|
|000021d0| 65 63 65 69 76 65 72 28 | 4a 75 67 67 6c 65 48 61 |eceiver(|JuggleHa|
|000021e0| 6e 64 6c 65 20 61 4a 75 | 67 67 6c 65 2c 20 48 61 |ndle aJu|ggle, Ha|
|000021f0| 6e 64 4c 6f 63 09 66 72 | 6f 6d 29 3b 0d 0d 2f 2f |ndLoc.fr|om);..//|
|00002200| 20 72 6f 75 74 69 6e 65 | 73 20 74 68 61 74 20 68 | routine|s that h|
|00002210| 61 6e 64 6c 65 20 6a 75 | 67 67 6c 65 72 73 0d 76 |andle ju|gglers.v|
|00002220| 6f 69 64 09 09 09 09 4d | 6f 76 65 4a 75 67 67 6c |oid....M|oveJuggl|
|00002230| 65 72 28 4a 75 67 67 6c | 65 48 61 6e 64 6c 65 20 |er(Juggl|eHandle |
|00002240| 61 4a 75 67 67 6c 65 2c | 20 73 68 6f 72 74 20 77 |aJuggle,| short w|
|00002250| 68 69 63 68 4a 75 67 67 | 6c 65 72 2c 20 73 68 6f |hichJugg|ler, sho|
|00002260| 72 74 20 6f 66 66 73 65 | 74 29 3b 0d 42 6f 6f 6c |rt offse|t);.Bool|
|00002270| 65 61 6e 09 09 09 09 41 | 64 64 4a 75 67 67 6c 65 |ean....A|ddJuggle|
|00002280| 72 28 4a 75 67 67 6c 65 | 48 61 6e 64 6c 65 20 61 |r(Juggle|Handle a|
|00002290| 4a 75 67 67 6c 65 29 3b | 0d 57 69 6e 64 6f 77 50 |Juggle);|.WindowP|
|000022a0| 74 72 09 09 09 52 65 73 | 69 7a 65 4a 75 67 67 6c |tr...Res|izeJuggl|
|000022b0| 65 28 57 69 6e 64 6f 77 | 50 74 72 20 77 69 6e 64 |e(Window|Ptr wind|
|000022c0| 29 3b 0d 0d 0d 2f 2f 20 | 2d 2d 2d 2d a5 20 4a 75 |);...// |----. Ju|
|000022d0| 67 67 6c 65 47 72 61 70 | 68 69 63 73 2e 63 20 a5 |ggleGrap|hics.c .|
|000022e0| 2d 2d 2d 2d 0d 0d 2f 2f | 20 69 6e 69 74 69 61 6c |----..//| initial|
|000022f0| 69 7a 61 74 69 6f 6e 20 | 61 6e 64 20 63 6c 65 61 |ization |and clea|
|00002300| 6e 20 75 70 0d 76 6f 69 | 64 09 09 09 09 49 6e 69 |n up.voi|d....Ini|
|00002310| 74 43 6f 6d 6d 6f 6e 47 | 72 61 70 68 69 63 4f 62 |tCommonG|raphicOb|
|00002320| 6a 65 63 74 73 28 76 6f | 69 64 29 3b 0d 76 6f 69 |jects(vo|id);.voi|
|00002330| 64 09 09 09 09 4b 69 6c | 6c 43 6f 6d 6d 6f 6e 47 |d....Kil|lCommonG|
|00002340| 72 61 70 68 69 63 4f 62 | 6a 65 63 74 73 28 76 6f |raphicOb|jects(vo|
|00002350| 69 64 29 3b 0d 0d 2f 2f | 20 73 68 61 70 65 20 63 |id);..//| shape c|
|00002360| 72 65 61 74 69 6f 6e 0d | 67 78 53 68 61 70 65 09 |reation.|gxShape.|
|00002370| 09 09 09 4d 61 6b 65 54 | 68 72 6f 77 53 68 61 70 |...MakeT|hrowShap|
|00002380| 65 28 4a 75 67 67 6c 65 | 48 61 6e 64 6c 65 20 61 |e(Juggle|Handle a|
|00002390| 4a 75 67 67 6c 65 2c 20 | 42 6f 6f 6c 65 61 6e 20 |Juggle, |Boolean |
|000023a0| 66 61 64 65 64 29 3b 0d | 67 78 53 68 61 70 65 09 |faded);.|gxShape.|
|000023b0| 09 09 09 4d 61 6b 65 48 | 61 6e 64 53 68 61 70 65 |...MakeH|andShape|
|000023c0| 28 42 6f 6f 6c 65 61 6e | 20 72 69 67 68 74 48 61 |(Boolean| rightHa|
|000023d0| 6e 64 2c 20 42 6f 6f 6c | 65 61 6e 20 66 61 64 65 |nd, Bool|ean fade|
|000023e0| 64 29 3b 0d 67 78 53 68 | 61 70 65 09 09 09 09 4d |d);.gxSh|ape....M|
|000023f0| 61 6b 65 4c 61 62 65 6c | 53 68 61 70 65 28 73 68 |akeLabel|Shape(sh|
|00002400| 6f 72 74 20 6a 75 67 67 | 6c 65 72 4e 75 6d 62 65 |ort jugg|lerNumbe|
|00002410| 72 29 3b 0d 67 78 53 68 | 61 70 65 09 09 09 09 4d |r);.gxSh|ape....M|
|00002420| 61 6b 65 53 65 70 61 72 | 61 74 6f 72 53 68 61 70 |akeSepar|atorShap|
|00002430| 65 28 4a 75 67 67 6c 65 | 48 61 6e 64 6c 65 20 61 |e(Juggle|Handle a|
|00002440| 4a 75 67 67 6c 65 2c 20 | 42 6f 6f 6c 65 61 6e 20 |Juggle, |Boolean |
|00002450| 69 73 48 6f 72 69 7a 29 | 3b 0d 67 78 53 68 61 70 |isHoriz)|;.gxShap|
|00002460| 65 20 09 09 09 4d 61 6b | 65 4a 75 67 67 6c 65 72 |e ...Mak|eJuggler|
|00002470| 53 68 61 70 65 28 4a 75 | 67 67 6c 65 48 61 6e 64 |Shape(Ju|ggleHand|
|00002480| 6c 65 20 61 4a 75 67 67 | 6c 65 2c 20 42 6f 6f 6c |le aJugg|le, Bool|
|00002490| 65 61 6e 20 72 69 67 68 | 74 46 69 72 73 74 2c 20 |ean righ|tFirst, |
|000024a0| 73 68 6f 72 74 20 6a 75 | 67 67 6c 65 72 4e 75 6d |short ju|gglerNum|
|000024b0| 62 65 72 29 3b 0d 67 78 | 53 68 61 70 65 09 09 09 |ber);.gx|Shape...|
|000024c0| 09 4d 61 6b 65 50 72 69 | 6e 74 69 6e 67 53 68 61 |.MakePri|ntingSha|
|000024d0| 70 65 28 4a 75 67 67 6c | 65 48 61 6e 64 6c 65 20 |pe(Juggl|eHandle |
|000024e0| 61 4a 75 67 67 6c 65 29 | 3b 0d 4f 53 45 72 72 09 |aJuggle)|;.OSErr.|
|000024f0| 09 09 09 53 65 74 55 70 | 4a 75 67 67 6c 65 56 69 |...SetUp|JuggleVi|
|00002500| 65 77 50 6f 72 74 73 28 | 57 69 6e 64 6f 77 50 74 |ewPorts(|WindowPt|
|00002510| 72 20 77 69 6e 64 6f 77 | 2c 20 4a 75 67 67 6c 65 |r window|, Juggle|
|00002520| 48 61 6e 64 6c 65 20 61 | 4a 75 67 67 6c 65 29 3b |Handle a|Juggle);|
|00002530| 0d 67 78 53 68 61 70 65 | 09 09 09 09 53 65 74 55 |.gxShape|....SetU|
|00002540| 70 4a 75 67 67 6c 65 47 | 72 61 70 68 69 63 73 28 |pJuggleG|raphics(|
|00002550| 57 69 6e 64 6f 77 50 74 | 72 20 77 69 6e 64 6f 77 |WindowPt|r window|
|00002560| 2c 20 4a 75 67 67 6c 65 | 48 61 6e 64 6c 65 20 61 |, Juggle|Handle a|
|00002570| 4a 75 67 67 6c 65 29 3b | 0d 76 6f 69 64 09 09 09 |Juggle);|.void...|
|00002580| 09 43 6c 65 61 6e 55 70 | 4a 75 67 67 6c 65 53 68 |.CleanUp|JuggleSh|
|00002590| 61 70 65 73 28 57 69 6e | 64 6f 77 50 74 72 20 77 |apes(Win|dowPtr w|
|000025a0| 69 6e 64 6f 77 29 3b 0d | 0d 2f 2f 20 47 72 61 70 |indow);.|.// Grap|
|000025b0| 68 69 63 73 20 75 74 69 | 6c 69 74 69 65 73 0d 76 |hics uti|lities.v|
|000025c0| 6f 69 64 09 09 09 09 41 | 64 64 4e 65 77 54 68 72 |oid....A|ddNewThr|
|000025d0| 6f 77 53 68 61 70 65 28 | 4a 75 67 67 6c 65 48 61 |owShape(|JuggleHa|
|000025e0| 6e 64 6c 65 20 61 4a 75 | 67 67 6c 65 2c 20 67 78 |ndle aJu|ggle, gx|
|000025f0| 4c 69 6e 65 20 2a 6c 69 | 6e 65 2c 20 42 6f 6f 6c |Line *li|ne, Bool|
|00002600| 65 61 6e 20 64 72 61 77 | 29 3b 0d 76 6f 69 64 09 |ean draw|);.void.|
|00002610| 09 09 09 52 65 6d 6f 76 | 65 54 68 72 6f 77 53 68 |...Remov|eThrowSh|
|00002620| 61 70 65 28 4a 75 67 67 | 6c 65 48 61 6e 64 6c 65 |ape(Jugg|leHandle|
|00002630| 20 61 4a 75 67 67 6c 65 | 2c 20 73 68 6f 72 74 20 | aJuggle|, short |
|00002640| 69 6e 64 65 78 29 3b 0d | 76 6f 69 64 09 09 09 09 |index);.|void....|
|00002650| 4d 6f 76 65 54 68 72 6f | 77 53 68 61 70 65 28 4a |MoveThro|wShape(J|
|00002660| 75 67 67 6c 65 48 61 6e | 64 6c 65 20 61 4a 75 67 |uggleHan|dle aJug|
|00002670| 67 6c 65 2c 20 73 68 6f | 72 74 20 73 68 61 70 65 |gle, sho|rt shape|
|00002680| 49 6e 64 65 78 2c 20 67 | 78 4c 69 6e 65 20 2a 6e |Index, g|xLine *n|
|00002690| 65 77 4c 69 6e 65 29 3b | 0d 76 6f 69 64 09 09 09 |ewLine);|.void...|
|000026a0| 09 52 65 62 75 69 6c 64 | 54 68 72 6f 77 73 50 69 |.Rebuild|ThrowsPi|
|000026b0| 63 74 28 4a 75 67 67 6c | 65 48 61 6e 64 6c 65 20 |ct(Juggl|eHandle |
|000026c0| 61 4a 75 67 67 6c 65 29 | 3b 0d 0d 76 6f 69 64 09 |aJuggle)|;..void.|
|000026d0| 09 09 09 4d 6f 76 65 4a | 75 67 67 6c 65 72 49 6e |...MoveJ|ugglerIn|
|000026e0| 50 69 63 74 28 4a 75 67 | 67 6c 65 48 61 6e 64 6c |Pict(Jug|gleHandl|
|000026f0| 65 20 61 4a 75 67 67 6c | 65 2c 20 73 68 6f 72 74 |e aJuggl|e, short|
|00002700| 20 66 72 6f 6d 52 6f 77 | 2c 20 73 68 6f 72 74 20 | fromRow|, short |
|00002710| 74 6f 52 6f 77 29 3b 0d | 76 6f 69 64 09 09 09 09 |toRow);.|void....|
|00002720| 53 77 69 74 63 68 4a 75 | 67 67 6c 65 72 48 61 6e |SwitchJu|gglerHan|
|00002730| 64 73 28 4a 75 67 67 6c | 65 48 61 6e 64 6c 65 20 |ds(Juggl|eHandle |
|00002740| 61 4a 75 67 67 6c 65 2c | 20 73 68 6f 72 74 20 69 |aJuggle,| short i|
|00002750| 6e 64 65 78 29 3b 0d 76 | 6f 69 64 09 09 09 09 43 |ndex);.v|oid....C|
|00002760| 68 61 6e 67 65 4a 75 67 | 67 6c 65 72 4c 61 62 65 |hangeJug|glerLabe|
|00002770| 6c 28 4a 75 67 67 6c 65 | 48 61 6e 64 6c 65 20 61 |l(Juggle|Handle a|
|00002780| 4a 75 67 67 6c 65 2c 20 | 73 68 6f 72 74 20 6a 75 |Juggle, |short ju|
|00002790| 67 67 6c 65 72 2c 20 73 | 68 6f 72 74 20 6e 65 77 |ggler, s|hort new|
|000027a0| 49 64 29 3b 0d 0d 76 6f | 69 64 09 09 09 09 53 65 |Id);..vo|id....Se|
|000027b0| 74 44 65 65 70 53 68 61 | 70 65 49 6e 6b 28 67 78 |tDeepSha|peInk(gx|
|000027c0| 53 68 61 70 65 20 73 68 | 2c 20 67 78 49 6e 6b 20 |Shape sh|, gxInk |
|000027d0| 69 6e 6b 29 3b 0d 52 67 | 6e 48 61 6e 64 6c 65 09 |ink);.Rg|nHandle.|
|000027e0| 09 09 47 65 74 53 68 61 | 70 65 42 6f 75 6e 64 73 |..GetSha|peBounds|
|000027f0| 52 67 6e 28 67 78 53 68 | 61 70 65 20 6a 75 67 67 |Rgn(gxSh|ape jugg|
|00002800| 6c 65 72 29 3b 0d 52 65 | 63 74 2a 09 09 09 09 47 |ler);.Re|ct*....G|
|00002810| 65 74 53 68 61 70 65 42 | 6f 75 6e 64 73 51 44 52 |etShapeB|oundsQDR|
|00002820| 65 63 74 28 67 78 53 68 | 61 70 65 20 73 68 61 70 |ect(gxSh|ape shap|
|00002830| 65 2c 20 52 65 63 74 20 | 2a 72 65 63 74 29 3b 0d |e, Rect |*rect);.|
|00002840| 50 6f 69 6e 74 09 09 09 | 09 47 65 74 51 44 57 69 |Point...|.GetQDWi|
|00002850| 6e 64 6f 77 4f 72 69 67 | 69 6e 28 57 69 6e 64 6f |ndowOrig|in(Windo|
|00002860| 77 50 74 72 20 77 69 6e | 64 6f 77 29 3b 0d 0d 76 |wPtr win|dow);..v|
|00002870| 6f 69 64 09 09 09 09 53 | 65 74 53 68 61 70 65 46 |oid....S|etShapeF|
|00002880| 61 64 65 50 6f 72 74 73 | 28 4a 75 67 67 6c 65 48 |adePorts|(JuggleH|
|00002890| 61 6e 64 6c 65 20 61 4a | 75 67 67 6c 65 2c 20 67 |andle aJ|uggle, g|
|000028a0| 78 53 68 61 70 65 20 73 | 68 61 70 65 29 3b 0d 76 |xShape s|hape);.v|
|000028b0| 6f 69 64 09 09 09 09 53 | 65 74 53 68 61 70 65 4d |oid....S|etShapeM|
|000028c0| 61 69 6e 50 6f 72 74 28 | 4a 75 67 67 6c 65 48 61 |ainPort(|JuggleHa|
|000028d0| 6e 64 6c 65 20 61 4a 75 | 67 67 6c 65 2c 20 67 78 |ndle aJu|ggle, gx|
|000028e0| 53 68 61 70 65 20 73 68 | 61 70 65 29 3b 0d 76 6f |Shape sh|ape);.vo|
|000028f0| 69 64 09 09 09 09 53 65 | 74 49 6e 6b 42 6c 65 6e |id....Se|tInkBlen|
|00002900| 64 4d 6f 64 65 28 67 78 | 49 6e 6b 20 74 68 65 49 |dMode(gx|Ink theI|
|00002910| 6e 6b 2c 20 73 68 6f 72 | 74 20 70 65 72 63 65 6e |nk, shor|t percen|
|00002920| 74 29 3b 0d 0d 76 6f 69 | 64 09 09 09 09 52 65 73 |t);..voi|d....Res|
|00002930| 65 74 4a 75 67 67 6c 65 | 43 6f 6e 74 65 6e 74 53 |etJuggle|ContentS|
|00002940| 69 7a 65 28 4a 75 67 67 | 6c 65 48 61 6e 64 6c 65 |ize(Jugg|leHandle|
|00002950| 20 61 4a 75 67 67 6c 65 | 29 3b 0d 0d 2f 2f 20 41 | aJuggle|);..// A|
|00002960| 63 63 65 73 73 6f 72 73 | 0d 67 78 53 68 61 70 65 |ccessors|.gxShape|
|00002970| 09 09 09 09 47 65 74 44 | 6f 63 54 68 72 6f 77 73 |....GetD|ocThrows|
|00002980| 50 69 63 74 28 57 69 6e | 64 6f 77 50 74 72 20 77 |Pict(Win|dowPtr w|
|00002990| 69 6e 64 29 3b 0d 67 78 | 53 68 61 70 65 09 09 09 |ind);.gx|Shape...|
|000029a0| 09 47 65 74 44 6f 63 46 | 61 64 65 64 54 68 72 6f |.GetDocF|adedThro|
|000029b0| 77 73 50 69 63 74 28 57 | 69 6e 64 6f 77 50 74 72 |wsPict(W|indowPtr|
|000029c0| 20 77 69 6e 64 29 3b 0d | 0d 2f 2f 20 2d 2d 2d 2d | wind);.|.// ----|
|000029d0| a5 20 4a 75 67 67 6c 65 | 49 6e 74 65 72 66 61 63 |. Juggle|Interfac|
|000029e0| 65 2e 63 20 a5 2d 2d 2d | 2d 0d 0d 2f 2f 20 6d 6f |e.c .---|-..// mo|
|000029f0| 75 73 65 20 68 61 6e 64 | 6c 69 6e 67 20 72 6f 75 |use hand|ling rou|
|00002a00| 74 69 6e 65 73 0d 76 6f | 69 64 09 09 09 09 44 6f |tines.vo|id....Do|
|00002a10| 4a 75 67 67 6c 65 43 6c | 69 63 6b 28 57 69 6e 64 |JuggleCl|ick(Wind|
|00002a20| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 2c 20 50 6f |owPtr wi|ndow, Po|
|00002a30| 69 6e 74 20 70 2c 20 45 | 76 65 6e 74 52 65 63 6f |int p, E|ventReco|
|00002a40| 72 64 20 2a 65 76 65 6e | 74 29 3b 0d 76 6f 69 64 |rd *even|t);.void|
|00002a50| 09 09 09 09 44 72 61 67 | 4a 75 67 67 6c 65 72 28 |....Drag|Juggler(|
|00002a60| 57 69 6e 64 6f 77 50 74 | 72 20 77 69 6e 64 6f 77 |WindowPt|r window|
|00002a70| 2c 20 67 78 53 68 61 70 | 65 20 6a 75 67 67 6c 65 |, gxShap|e juggle|
|00002a80| 72 50 69 63 74 2c 20 67 | 78 50 6f 69 6e 74 20 2a |rPict, g|xPoint *|
|00002a90| 63 6c 69 63 6b 50 74 2c | 0d 09 09 09 09 09 09 09 |clickPt,|........|
|00002aa0| 09 09 73 68 6f 72 74 20 | 77 68 69 63 68 4a 75 67 |..short |whichJug|
|00002ab0| 67 6c 65 72 2c 20 73 68 | 6f 72 74 20 63 6f 6e 73 |gler, sh|ort cons|
|00002ac0| 74 72 61 69 6e 74 29 3b | 0d 76 6f 69 64 09 20 09 |traint);|.void. .|
|00002ad0| 09 09 44 72 61 67 4e 65 | 77 54 68 72 6f 77 28 57 |..DragNe|wThrow(W|
|00002ae0| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 2c |indowPtr| window,|
|00002af0| 20 67 78 50 6f 69 6e 74 | 20 2a 66 72 6f 6d 29 3b | gxPoint| *from);|
|00002b00| 0d 76 6f 69 64 09 09 09 | 09 44 72 61 67 54 68 72 |.void...|.DragThr|
|00002b10| 6f 77 28 09 4a 75 67 67 | 6c 65 48 61 6e 64 6c 65 |ow(.Jugg|leHandle|
|00002b20| 20 61 4a 75 67 67 6c 65 | 2c 0d 09 09 09 09 09 09 | aJuggle|,.......|
|00002b30| 09 09 6c 6f 6e 67 09 73 | 68 61 70 65 49 6e 64 65 |..long.s|hapeInde|
|00002b40| 78 2c 0d 09 09 09 09 09 | 09 09 09 6c 6f 6e 67 20 |x,......|...long |
|00002b50| 09 77 68 69 63 68 50 6f | 69 6e 74 2c 0d 09 09 09 |.whichPo|int,....|
|00002b60| 09 09 09 09 09 67 78 50 | 6f 69 6e 74 20 2a 66 72 |.....gxP|oint *fr|
|00002b70| 6f 6d 09 29 3b 0d 50 6f | 69 6e 74 09 09 09 09 44 |om.);.Po|int....D|
|00002b80| 72 61 67 47 72 61 79 52 | 67 6e 47 72 69 64 64 65 |ragGrayR|gnGridde|
|00002b90| 64 28 09 52 67 6e 48 61 | 6e 64 6c 65 20 74 68 65 |d(.RgnHa|ndle the|
|00002ba0| 52 67 6e 2c 0d 09 09 09 | 09 09 09 09 09 09 09 50 |Rgn,....|.......P|
|00002bb0| 6f 69 6e 74 20 73 74 61 | 72 74 50 74 2c 0d 09 09 |oint sta|rtPt,...|
|00002bc0| 09 09 09 09 09 09 09 09 | 52 65 63 74 20 2a 6c 69 |........|Rect *li|
|00002bd0| 6d 69 74 52 65 63 74 2c | 0d 09 09 09 09 09 09 09 |mitRect,|........|
|00002be0| 09 09 09 52 65 63 74 20 | 2a 73 6c 6f 70 52 65 63 |...Rect |*slopRec|
|00002bf0| 74 2c 0d 09 09 09 09 09 | 09 09 09 09 09 73 68 6f |t,......|.....sho|
|00002c00| 72 74 20 61 78 69 73 2c | 0d 09 09 09 09 09 09 09 |rt axis,|........|
|00002c10| 09 09 09 50 6f 69 6e 74 | 20 67 72 69 64 2c 0d 09 |...Point| grid,..|
|00002c20| 09 09 09 09 09 09 09 09 | 09 50 6f 69 6e 74 20 2a |........|.Point *|
|00002c30| 69 6e 69 74 69 61 6c 4f | 66 66 73 65 74 29 3b 0d |initialO|ffset);.|
|00002c40| 76 6f 69 64 09 09 09 09 | 4b 65 65 70 50 74 49 6e |void....|KeepPtIn|
|00002c50| 42 6f 75 6e 64 73 28 4a | 75 67 67 6c 65 48 61 6e |Bounds(J|uggleHan|
|00002c60| 64 6c 65 20 61 4a 75 67 | 67 6c 65 2c 20 67 78 50 |dle aJug|gle, gxP|
|00002c70| 6f 69 6e 74 20 2a 67 6f | 6f 64 50 74 29 3b 0d 0d |oint *go|odPt);..|
|00002c80| 2f 2f 20 67 72 69 64 20 | 65 6e 66 6f 72 63 65 6d |// grid |enforcem|
|00002c90| 65 6e 74 0d 76 6f 69 64 | 09 09 09 09 47 65 74 47 |ent.void|....GetG|
|00002ca0| 72 69 64 4f 66 66 73 65 | 74 28 67 78 50 6f 69 6e |ridOffse|t(gxPoin|
|00002cb0| 74 20 2a 70 6f 69 6e 74 | 44 61 74 61 2c 20 67 78 |t *point|Data, gx|
|00002cc0| 50 6f 69 6e 74 20 2a 67 | 72 69 64 29 3b 0d 76 6f |Point *g|rid);.vo|
|00002cd0| 69 64 09 09 09 09 47 65 | 74 53 68 6f 72 74 47 72 |id....Ge|tShortGr|
|00002ce0| 69 64 4f 66 66 73 65 74 | 28 50 6f 69 6e 74 20 2a |idOffset|(Point *|
|00002cf0| 70 6f 69 6e 74 44 61 74 | 61 2c 20 50 6f 69 6e 74 |pointDat|a, Point|
|00002d00| 20 67 72 69 64 29 3b 0d | 42 6f 6f 6c 65 61 6e 20 | grid);.|Boolean |
|00002d10| 09 09 09 44 65 74 65 6e | 74 28 67 78 50 6f 69 6e |...Deten|t(gxPoin|
|00002d20| 74 20 2a 70 6f 69 6e 74 | 44 61 74 61 2c 20 67 78 |t *point|Data, gx|
|00002d30| 50 6f 69 6e 74 20 2a 67 | 72 69 64 2c 20 46 69 78 |Point *g|rid, Fix|
|00002d40| 65 64 20 64 65 74 65 6e | 74 4c 69 6d 69 74 29 3b |ed deten|tLimit);|
|00002d50| 0d 76 6f 69 64 09 09 09 | 09 53 65 74 47 72 69 64 |.void...|.SetGrid|
|00002d60| 50 6f 73 28 67 78 50 6f | 69 6e 74 20 2a 70 6f 69 |Pos(gxPo|int *poi|
|00002d70| 6e 74 44 61 74 61 2c 20 | 67 78 50 6f 69 6e 74 20 |ntData, |gxPoint |
|00002d80| 2a 67 72 69 64 29 3b 0d | 0d 2f 2f 20 53 63 72 65 |*grid);.|.// Scre|
|00002d90| 65 6e 20 63 6f 6e 76 65 | 72 73 69 6f 6e 20 72 6f |en conve|rsion ro|
|00002da0| 75 74 69 6e 65 73 0d 76 | 6f 69 64 09 09 09 09 4d |utines.v|oid....M|
|00002db0| 6f 76 65 4a 75 67 67 6c | 65 72 49 6e 4d 61 70 28 |oveJuggl|erInMap(|
|00002dc0| 4a 75 67 67 6c 65 48 61 | 6e 64 6c 65 20 61 4a 75 |JuggleHa|ndle aJu|
|00002dd0| 67 67 6c 65 2c 20 73 68 | 6f 72 74 20 77 68 69 63 |ggle, sh|ort whic|
|00002de0| 68 4a 75 67 67 6c 65 72 | 2c 0d 09 09 09 09 09 09 |hJuggler|,.......|
|00002df0| 09 09 09 09 09 73 68 6f | 72 74 20 66 72 6f 6d 52 |.....sho|rt fromR|
|00002e00| 6f 77 2c 20 73 68 6f 72 | 74 20 74 6f 52 6f 77 29 |ow, shor|t toRow)|
|00002e10| 3b 0d 73 68 6f 72 74 09 | 09 09 09 4a 75 67 67 6c |;.short.|...Juggl|
|00002e20| 65 72 54 6f 52 6f 77 28 | 4a 75 67 67 6c 65 48 61 |erToRow(|JuggleHa|
|00002e30| 6e 64 6c 65 20 61 4a 75 | 67 67 6c 65 2c 20 73 68 |ndle aJu|ggle, sh|
|00002e40| 6f 72 74 20 6a 75 67 67 | 6c 65 72 29 3b 0d 73 68 |ort jugg|ler);.sh|
|00002e50| 6f 72 74 09 09 09 09 52 | 6f 77 54 6f 4a 75 67 67 |ort....R|owToJugg|
|00002e60| 6c 65 72 28 4a 75 67 67 | 6c 65 48 61 6e 64 6c 65 |ler(Jugg|leHandle|
|00002e70| 20 61 4a 75 67 67 6c 65 | 2c 20 73 68 6f 72 74 20 | aJuggle|, short |
|00002e80| 72 6f 77 29 3b 0d 76 6f | 69 64 09 09 09 09 48 61 |row);.vo|id....Ha|
|00002e90| 6e 64 4c 6f 63 54 6f 50 | 6f 69 6e 74 28 4a 75 67 |ndLocToP|oint(Jug|
|00002ea0| 67 6c 65 48 61 6e 64 6c | 65 20 61 4a 75 67 67 6c |gleHandl|e aJuggl|
|00002eb0| 65 2c 20 48 61 6e 64 4c | 6f 63 20 2a 68 61 6e 64 |e, HandL|oc *hand|
|00002ec0| 2c 20 67 78 50 6f 69 6e | 74 20 2a 70 6f 69 6e 74 |, gxPoin|t *point|
|00002ed0| 29 3b 0d 76 6f 69 64 09 | 09 09 09 50 6f 69 6e 74 |);.void.|...Point|
|00002ee0| 54 6f 48 61 6e 64 4c 6f | 63 28 4a 75 67 67 6c 65 |ToHandLo|c(Juggle|
|00002ef0| 48 61 6e 64 6c 65 20 61 | 4a 75 67 67 6c 65 2c 20 |Handle a|Juggle, |
|00002f00| 67 78 50 6f 69 6e 74 20 | 2a 70 6f 69 6e 74 2c 20 |gxPoint |*point, |
|00002f10| 48 61 6e 64 4c 6f 63 20 | 2a 68 61 6e 64 2c 0d 09 |HandLoc |*hand,..|
|00002f20| 09 09 09 09 09 09 09 09 | 42 6f 6f 6c 65 61 6e 20 |........|Boolean |
|00002f30| 77 72 61 70 49 74 29 3b | 0d 48 61 6e 64 50 74 72 |wrapIt);|.HandPtr|
|00002f40| 09 09 09 09 50 6f 69 6e | 74 54 6f 48 61 6e 64 28 |....Poin|tToHand(|
|00002f50| 4a 75 67 67 6c 65 48 61 | 6e 64 6c 65 20 61 4a 75 |JuggleHa|ndle aJu|
|00002f60| 67 67 6c 65 2c 20 67 78 | 50 6f 69 6e 74 20 2a 70 |ggle, gx|Point *p|
|00002f70| 6f 69 6e 74 2c 20 42 6f | 6f 6c 65 61 6e 20 77 72 |oint, Bo|olean wr|
|00002f80| 61 70 49 74 29 3b 0d 0d | 76 6f 69 64 09 09 09 09 |apIt);..|void....|
|00002f90| 4c 69 6e 65 54 6f 41 64 | 64 65 64 54 68 72 6f 77 |LineToAd|dedThrow|
|00002fa0| 28 4a 75 67 67 6c 65 48 | 61 6e 64 6c 65 20 61 4a |(JuggleH|andle aJ|
|00002fb0| 75 67 67 6c 65 2c 20 67 | 78 4c 69 6e 65 20 2a 6c |uggle, g|xLine *l|
|00002fc0| 69 6e 65 29 3b 0d 76 6f | 69 64 09 09 09 09 4c 69 |ine);.vo|id....Li|
|00002fd0| 6e 65 54 6f 52 65 6d 6f | 76 65 64 54 68 72 6f 77 |neToRemo|vedThrow|
|00002fe0| 28 4a 75 67 67 6c 65 48 | 61 6e 64 6c 65 20 61 4a |(JuggleH|andle aJ|
|00002ff0| 75 67 67 6c 65 2c 20 67 | 78 4c 69 6e 65 20 2a 6c |uggle, g|xLine *l|
|00003000| 69 6e 65 29 3b 0d 0d 2f | 2f 20 44 69 61 6c 6f 67 |ine);../|/ Dialog|
|00003010| 20 72 6f 75 74 69 6e 65 | 73 0d 76 6f 69 64 09 09 | routine|s.void..|
|00003020| 09 09 44 6f 4a 75 67 67 | 6c 65 53 69 7a 65 44 69 |..DoJugg|leSizeDi|
|00003030| 61 6c 6f 67 28 73 68 6f | 72 74 20 2a 6e 75 6d 43 |alog(sho|rt *numC|
|00003040| 6f 75 6e 74 73 2c 20 73 | 68 6f 72 74 20 2a 6e 75 |ounts, s|hort *nu|
|00003050| 6d 4a 75 67 67 6c 65 72 | 73 29 3b 0d 42 6f 6f 6c |mJuggler|s);.Bool|
|00003060| 65 61 6e 09 09 09 09 4a | 75 67 67 6c 65 53 69 7a |ean....J|uggleSiz|
|00003070| 65 4f 4b 28 44 69 61 6c | 6f 67 50 74 72 20 64 70 |eOK(Dial|ogPtr dp|
|00003080| 74 72 29 3b 0d 0d 0d 2f | 2f 20 53 74 72 69 6e 67 |tr);.../|/ String|
|00003090| 20 75 74 69 6c 69 74 79 | 20 72 6f 75 74 69 6e 65 | utility| routine|
|000030a0| 73 2c 20 66 72 6f 6d 20 | 44 54 53 0d 73 68 6f 72 |s, from |DTS.shor|
|000030b0| 74 09 09 09 09 63 6c 65 | 6e 28 63 68 61 72 20 2a |t....cle|n(char *|
|000030c0| 63 70 74 72 29 3b 0d 63 | 68 61 72 2a 09 09 09 09 |cptr);.c|har*....|
|000030d0| 63 63 61 74 28 63 68 61 | 72 20 2a 73 31 2c 20 63 |ccat(cha|r *s1, c|
|000030e0| 68 61 72 20 2a 73 32 29 | 3b 0d 63 68 61 72 2a 09 |har *s2)|;.char*.|
|000030f0| 09 09 09 63 63 70 79 28 | 63 68 61 72 20 2a 73 31 |...ccpy(|char *s1|
|00003100| 2c 20 63 68 61 72 20 2a | 73 32 29 3b 0d 76 6f 69 |, char *|s2);.voi|
|00003110| 64 09 09 09 09 70 32 63 | 28 53 74 72 69 6e 67 50 |d....p2c|(StringP|
|00003120| 74 72 20 63 70 74 72 29 | 3b 0d 0d 2f 2f 20 75 74 |tr cptr)|;..// ut|
|00003130| 69 6c 73 0d 73 68 6f 72 | 74 09 09 09 09 6d 69 6e |ils.shor|t....min|
|00003140| 28 73 68 6f 72 74 20 61 | 2c 20 73 68 6f 72 74 20 |(short a|, short |
|00003150| 62 29 3b 0d 0d 2f 2f 20 | 2d 2d 2d 2d a5 20 4a 75 |b);..// |----. Ju|
|00003160| 67 67 6c 65 46 69 6c 65 | 73 2e 63 20 a5 2d 2d 2d |ggleFile|s.c .---|
|00003170| 2d 0d 4f 53 45 72 72 09 | 09 09 09 53 61 76 65 4a |-.OSErr.|...SaveJ|
|00003180| 75 67 67 6c 65 28 4a 75 | 67 67 6c 65 48 61 6e 64 |uggle(Ju|ggleHand|
|00003190| 6c 65 20 61 4a 75 67 67 | 6c 65 29 3b 0d 4f 53 45 |le aJugg|le);.OSE|
|000031a0| 72 72 09 09 09 09 4a 75 | 67 67 6c 65 54 6f 45 78 |rr....Ju|ggleToEx|
|000031b0| 69 73 74 69 6e 67 46 69 | 6c 65 28 46 53 53 70 65 |istingFi|le(FSSpe|
|000031c0| 63 20 2a 66 69 6c 65 53 | 70 65 63 2c 20 4a 75 67 |c *fileS|pec, Jug|
|000031d0| 67 6c 65 48 61 6e 64 6c | 65 20 61 4a 75 67 67 6c |gleHandl|e aJuggl|
|000031e0| 65 29 3b 0d 4f 53 45 72 | 72 09 09 09 09 4a 75 67 |e);.OSEr|r....Jug|
|000031f0| 67 6c 65 54 6f 4e 65 77 | 46 69 6c 65 28 46 53 53 |gleToNew|File(FSS|
|00003200| 70 65 63 20 2a 66 69 6c | 65 53 70 65 63 2c 20 4a |pec *fil|eSpec, J|
|00003210| 75 67 67 6c 65 48 61 6e | 64 6c 65 20 61 4a 75 67 |uggleHan|dle aJug|
|00003220| 67 6c 65 29 3b 0d 4f 53 | 45 72 72 09 09 09 09 57 |gle);.OS|Err....W|
|00003230| 72 69 74 65 4a 75 67 67 | 6c 65 54 6f 46 69 6c 65 |riteJugg|leToFile|
|00003240| 28 46 53 53 70 65 63 20 | 2a 66 69 6c 65 53 70 65 |(FSSpec |*fileSpe|
|00003250| 63 2c 20 4a 75 67 67 6c | 65 48 61 6e 64 6c 65 20 |c, Juggl|eHandle |
|00003260| 61 4a 75 67 67 6c 65 29 | 3b 0d 4f 53 45 72 72 09 |aJuggle)|;.OSErr.|
|00003270| 09 09 09 4f 70 65 6e 4a | 75 67 67 6c 65 46 69 6c |...OpenJ|uggleFil|
|00003280| 65 28 46 53 53 70 65 63 | 20 2a 66 69 6c 65 53 70 |e(FSSpec| *fileSp|
|00003290| 65 63 2c 20 57 69 6e 64 | 6f 77 50 74 72 20 2a 77 |ec, Wind|owPtr *w|
|000032a0| 69 6e 64 29 3b 0d 0d 00 | 00 00 00 00 00 00 00 00 |ind);...|........|
|000032b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003300| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00003310| 1d 69 00 01 00 00 00 11 | 01 25 00 12 1e 5f 00 01 |.i......|.%..._..|
|00003320| 00 00 00 11 01 26 00 12 | 1f 72 00 01 00 00 00 11 |.....&..|.r......|
|00003330| 0f 50 61 70 65 72 4a 75 | 67 67 6c 69 6e 67 2e 68 |.PaperJu|ggling.h|
|00003340| 02 00 00 00 54 45 58 54 | 4d 4d 43 43 01 00 01 38 |....TEXT|MMCC...8|
|00003350| 00 00 54 45 58 54 4d 4d | 43 43 01 00 01 38 00 00 |..TEXTMM|CC...8..|
|00003360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003370| 00 00 aa b9 e7 b1 00 00 | 32 27 00 00 01 9a 00 01 |........|2'......|
|00003380| 00 00 00 12 01 04 00 10 | 06 d9 00 01 00 00 00 12 |........|........|
|00003390| 01 05 00 0f 07 a9 00 01 | 00 00 00 12 01 06 00 11 |........|........|
|000033a0| 08 88 00 01 00 00 00 12 | 01 07 00 0a 09 a7 00 01 |........|........|
|000033b0| 00 00 00 12 01 08 00 09 | 0a 57 00 01 00 00 00 12 |........|.W......|
|000033c0| 01 09 00 06 0a e5 00 01 | 00 00 00 12 01 0a 00 0e |........|........|
|000033d0| 0b 94 00 01 00 00 00 12 | 01 0b 00 11 0c 75 00 01 |........|.....u..|
|000033e0| 00 00 00 12 01 0c 00 16 | 0d 9d 00 01 00 00 00 12 |........|........|
|000033f0| 01 0d 00 16 0e a6 00 01 | 00 00 00 12 01 0e 00 14 |........|........|
|00003400| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00003410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003420| 00 00 00 00 00 00 00 03 | 00 04 00 4e 00 11 01 ce |........|...N....|
|00003430| 02 4e 00 4e 00 11 01 ce | 02 4e ab ba e9 3d 00 00 |.N.N....|.N...=..|
|00003440| 09 ee 00 00 09 ee 00 00 | 08 b9 01 00 00 00 00 04 |........|........|
|00003450| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00003460| 00 00 00 46 00 7b 66 28 | 21 0e 00 00 00 1c 00 46 |...F.{f(|!......F|
|00003470| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00003480| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00003490| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000034a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+